grpc

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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://pkg.go.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) GetName

func (x *Application) GetName() string

func (*Application) GetUser

func (x *Application) GetUser() string

func (*Application) ProtoMessage

func (*Application) ProtoMessage()

func (*Application) ProtoReflect

func (x *Application) ProtoReflect() protoreflect.Message

func (*Application) Reset

func (x *Application) Reset()

func (*Application) String

func (x *Application) String() string

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

func (*ApplicationData) Reset

func (x *ApplicationData) Reset()

func (*ApplicationData) String

func (x *ApplicationData) String() string

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

func (*ApplicationRequest) Reset

func (x *ApplicationRequest) Reset()

func (*ApplicationRequest) String

func (x *ApplicationRequest) String() string

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) GetName

func (x *MetricValue) GetName() string

func (*MetricValue) GetUser

func (x *MetricValue) GetUser() string

func (*MetricValue) GetValue

func (x *MetricValue) GetValue() string

func (*MetricValue) ProtoMessage

func (*MetricValue) ProtoMessage()

func (*MetricValue) ProtoReflect

func (x *MetricValue) ProtoReflect() protoreflect.Message

func (*MetricValue) Reset

func (x *MetricValue) Reset()

func (*MetricValue) String

func (x *MetricValue) String() string

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) GetTrack

func (x *Session) GetTrack() string

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

func (x *Session) ProtoReflect() protoreflect.Message

func (*Session) Reset

func (x *Session) Reset()

func (*Session) String

func (x *Session) String() string

type UnimplementedABNServer

type UnimplementedABNServer struct {
}

UnimplementedABNServer must be embedded to have forward compatible implementations.

func (UnimplementedABNServer) GetApplicationData

func (UnimplementedABNServer) Lookup

func (UnimplementedABNServer) WriteMetric

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL