grpc

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 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,
		},
	},
	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 version (index) the caller should send a request to.
	// Should be called for each request (transaction).
	Lookup(ctx context.Context, in *Application, opts ...grpc.CallOption) (*VersionRecommendation, 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)
}

ABNClient is the client API for ABN service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewABNClient

func NewABNClient(cc grpc.ClientConnInterface) ABNClient

type ABNServer

type ABNServer interface {
	// Identify a version (index) the caller should send a request to.
	// Should be called for each request (transaction).
	Lookup(context.Context, *Application) (*VersionRecommendation, 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)
	// 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 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 UnimplementedABNServer

type UnimplementedABNServer struct {
}

UnimplementedABNServer must be embedded to have forward compatible implementations.

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.

type VersionRecommendation added in v0.15.0

type VersionRecommendation struct {

	// versionNumber index of an application version
	VersionNumber int32 `protobuf:"varint,1,opt,name=versionNumber,proto3" json:"versionNumber,omitempty"`
	// contains filtered or unexported fields
}

func (*VersionRecommendation) Descriptor deprecated added in v0.15.0

func (*VersionRecommendation) Descriptor() ([]byte, []int)

Deprecated: Use VersionRecommendation.ProtoReflect.Descriptor instead.

func (*VersionRecommendation) GetVersionNumber added in v0.15.0

func (x *VersionRecommendation) GetVersionNumber() int32

func (*VersionRecommendation) ProtoMessage added in v0.15.0

func (*VersionRecommendation) ProtoMessage()

func (*VersionRecommendation) ProtoReflect added in v0.15.0

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

func (*VersionRecommendation) Reset added in v0.15.0

func (x *VersionRecommendation) Reset()

func (*VersionRecommendation) String added in v0.15.0

func (x *VersionRecommendation) String() string

Jump to

Keyboard shortcuts

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