Documentation
¶
Index ¶
- Variables
- func RegisterABNServer(s grpc.ServiceRegistrar, srv ABNServer)
- type ABNClient
- type ABNServer
- type Application
- type ApplicationData
- type ApplicationRequest
- func (*ApplicationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ApplicationRequest) GetApplication() string
- func (*ApplicationRequest) ProtoMessage()
- func (x *ApplicationRequest) ProtoReflect() protoreflect.Message
- func (x *ApplicationRequest) Reset()
- func (x *ApplicationRequest) String() string
- type MetricValue
- func (*MetricValue) Descriptor() ([]byte, []int)deprecated
- func (x *MetricValue) GetApplication() string
- func (x *MetricValue) GetName() string
- func (x *MetricValue) GetUser() string
- func (x *MetricValue) GetValue() string
- func (*MetricValue) ProtoMessage()
- func (x *MetricValue) ProtoReflect() protoreflect.Message
- func (x *MetricValue) Reset()
- func (x *MetricValue) String() string
- type Session
- type UnimplementedABNServer
- type UnsafeABNServer
Constants ¶
This section is empty.
Variables ¶
var ABN_ServiceDesc = grpc.ServiceDesc{
ServiceName: "main.ABN",
HandlerType: (*ABNServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Lookup",
Handler: _ABN_Lookup_Handler,
},
{
MethodName: "WriteMetric",
Handler: _ABN_WriteMetric_Handler,
},
{
MethodName: "GetApplicationData",
Handler: _ABN_GetApplicationData_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "abn/grpc/abn.proto",
}
ABN_ServiceDesc is the grpc.ServiceDesc for ABN service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_abn_grpc_abn_proto protoreflect.FileDescriptor
Functions ¶
func RegisterABNServer ¶
func RegisterABNServer(s grpc.ServiceRegistrar, srv ABNServer)
Types ¶
type ABNClient ¶
type ABNClient interface {
// Identify a track the caller should send a request to.
// Should be called for each request (transaction).
Lookup(ctx context.Context, in *Application, opts ...grpc.CallOption) (*Session, error)
// Write a metric value to metrics database.
// The metric value is explicitly associated with a list of transactions that contributed to its computation.
// The user is expected to identify these transactions.
WriteMetric(ctx context.Context, in *MetricValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get application data (tracks, versions and metrics for each)
GetApplicationData(ctx context.Context, in *ApplicationRequest, opts ...grpc.CallOption) (*ApplicationData, error)
}
ABNClient is the client API for ABN service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewABNClient ¶
func NewABNClient(cc grpc.ClientConnInterface) ABNClient
type ABNServer ¶
type ABNServer interface {
// Identify a track the caller should send a request to.
// Should be called for each request (transaction).
Lookup(context.Context, *Application) (*Session, error)
// Write a metric value to metrics database.
// The metric value is explicitly associated with a list of transactions that contributed to its computation.
// The user is expected to identify these transactions.
WriteMetric(context.Context, *MetricValue) (*emptypb.Empty, error)
// Get application data (tracks, versions and metrics for each)
GetApplicationData(context.Context, *ApplicationRequest) (*ApplicationData, error)
// contains filtered or unexported methods
}
ABNServer is the server API for ABN service. All implementations must embed UnimplementedABNServer for forward compatibility
type Application ¶
type Application struct {
// name of (backend) application or service
// This value is used to identify the Kubernetes objects that make up the service
// Kubernetes objects that comprise the service should have the label app.kubernetes.io/name set to name
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// User or user session identifier
User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*Application) Descriptor
deprecated
func (*Application) Descriptor() ([]byte, []int)
Deprecated: Use Application.ProtoReflect.Descriptor instead.
func (*Application) ProtoMessage ¶
func (*Application) ProtoMessage()
func (*Application) ProtoReflect ¶
func (x *Application) ProtoReflect() protoreflect.Message
type ApplicationData ¶
type ApplicationData struct {
// JSON string of application
ApplicationJson string `protobuf:"bytes,1,opt,name=applicationJson,proto3" json:"applicationJson,omitempty"`
// contains filtered or unexported fields
}
func (*ApplicationData) Descriptor
deprecated
func (*ApplicationData) Descriptor() ([]byte, []int)
Deprecated: Use ApplicationData.ProtoReflect.Descriptor instead.
func (*ApplicationData) GetApplicationJson ¶
func (x *ApplicationData) GetApplicationJson() string
func (*ApplicationData) ProtoMessage ¶
func (*ApplicationData) ProtoMessage()
func (*ApplicationData) ProtoReflect ¶
func (x *ApplicationData) ProtoReflect() protoreflect.Message
type ApplicationRequest ¶
type ApplicationRequest struct {
// name of application
Application string `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"`
// contains filtered or unexported fields
}
func (*ApplicationRequest) Descriptor
deprecated
func (*ApplicationRequest) Descriptor() ([]byte, []int)
Deprecated: Use ApplicationRequest.ProtoReflect.Descriptor instead.
func (*ApplicationRequest) GetApplication ¶
func (x *ApplicationRequest) GetApplication() string
func (*ApplicationRequest) ProtoMessage ¶
func (*ApplicationRequest) ProtoMessage()
func (*ApplicationRequest) ProtoReflect ¶
func (x *ApplicationRequest) ProtoReflect() protoreflect.Message
type MetricValue ¶
type MetricValue struct {
// Metric name
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Metric value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// name of application
Application string `protobuf:"bytes,3,opt,name=application,proto3" json:"application,omitempty"`
// User or user session identifier
User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*MetricValue) Descriptor
deprecated
func (*MetricValue) Descriptor() ([]byte, []int)
Deprecated: Use MetricValue.ProtoReflect.Descriptor instead.
func (*MetricValue) GetApplication ¶
func (x *MetricValue) GetApplication() string
func (*MetricValue) ProtoMessage ¶
func (*MetricValue) ProtoMessage()
func (*MetricValue) ProtoReflect ¶
func (x *MetricValue) ProtoReflect() protoreflect.Message
type Session ¶
type Session struct {
// Track identifier of an application version
// If this is not available, it will be the empty string
Track string `protobuf:"bytes,1,opt,name=track,proto3" json:"track,omitempty"`
// contains filtered or unexported fields
}
func (*Session) Descriptor
deprecated
func (*Session) Descriptor() ([]byte, []int)
Deprecated: Use Session.ProtoReflect.Descriptor instead.
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type UnimplementedABNServer ¶
type UnimplementedABNServer struct {
}
UnimplementedABNServer must be embedded to have forward compatible implementations.
func (UnimplementedABNServer) GetApplicationData ¶
func (UnimplementedABNServer) GetApplicationData(context.Context, *ApplicationRequest) (*ApplicationData, error)
func (UnimplementedABNServer) Lookup ¶
func (UnimplementedABNServer) Lookup(context.Context, *Application) (*Session, error)
func (UnimplementedABNServer) WriteMetric ¶
func (UnimplementedABNServer) WriteMetric(context.Context, *MetricValue) (*emptypb.Empty, error)
type UnsafeABNServer ¶
type UnsafeABNServer interface {
// contains filtered or unexported methods
}
UnsafeABNServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ABNServer will result in compilation errors.