grpc

package
v0.0.0-...-c6ccb82 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnectionService_Connect_FullMethodName = "/proto.grpc.v1.ConnectionService/Connect"
)

Variables

View Source
var (
	SubscriptionType_name = map[int32]string{
		0: "HEARTBEAT",
		1: "METRICS",
	}
	SubscriptionType_value = map[string]int32{
		"HEARTBEAT": 0,
		"METRICS":   1,
	}
)

Enum value maps for SubscriptionType.

View Source
var ConnectionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.grpc.v1.ConnectionService",
	HandlerType: (*ConnectionServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Connect",
			Handler:       _ConnectionService_Connect_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "proto/grpc/v1/connection.proto",
}

ConnectionService_ServiceDesc is the grpc.ServiceDesc for ConnectionService 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_proto_grpc_v1_client_proto protoreflect.FileDescriptor
View Source
var File_proto_grpc_v1_connection_proto protoreflect.FileDescriptor
View Source
var File_proto_grpc_v1_server_proto protoreflect.FileDescriptor

Functions

func RegisterConnectionServiceServer

func RegisterConnectionServiceServer(s grpc.ServiceRegistrar, srv ConnectionServiceServer)

Types

type ConnectRequest

type ConnectRequest struct {
	Request  *anypb.Any `protobuf:"bytes,1,opt,name=request,proto3,oneof" json:"request,omitempty"`
	Response *anypb.Any `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectRequest) Descriptor deprecated

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

Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.

func (*ConnectRequest) GetRequest

func (x *ConnectRequest) GetRequest() *anypb.Any

func (*ConnectRequest) GetResponse

func (x *ConnectRequest) GetResponse() *anypb.Any

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) ProtoReflect

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

func (*ConnectRequest) Reset

func (x *ConnectRequest) Reset()

func (*ConnectRequest) String

func (x *ConnectRequest) String() string

type ConnectResponse

type ConnectResponse struct {
	Request  *anypb.Any `protobuf:"bytes,1,opt,name=request,proto3,oneof" json:"request,omitempty"`
	Response *anypb.Any `protobuf:"bytes,2,opt,name=response,proto3,oneof" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectResponse) Descriptor deprecated

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

Deprecated: Use ConnectResponse.ProtoReflect.Descriptor instead.

func (*ConnectResponse) GetRequest

func (x *ConnectResponse) GetRequest() *anypb.Any

func (*ConnectResponse) GetResponse

func (x *ConnectResponse) GetResponse() *anypb.Any

func (*ConnectResponse) ProtoMessage

func (*ConnectResponse) ProtoMessage()

func (*ConnectResponse) ProtoReflect

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

func (*ConnectResponse) Reset

func (x *ConnectResponse) Reset()

func (*ConnectResponse) String

func (x *ConnectResponse) String() string

type ConnectionServiceClient

type ConnectionServiceClient interface {
	Connect(ctx context.Context, opts ...grpc.CallOption) (ConnectionService_ConnectClient, error)
}

ConnectionServiceClient is the client API for ConnectionService 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.

type ConnectionServiceServer

type ConnectionServiceServer interface {
	Connect(ConnectionService_ConnectServer) error
	// contains filtered or unexported methods
}

ConnectionServiceServer is the server API for ConnectionService service. All implementations must embed UnimplementedConnectionServiceServer for forward compatibility

type ConnectionService_ConnectClient

type ConnectionService_ConnectClient interface {
	Send(*ConnectRequest) error
	Recv() (*ConnectResponse, error)
	grpc.ClientStream
}

type ConnectionService_ConnectServer

type ConnectionService_ConnectServer interface {
	Send(*ConnectResponse) error
	Recv() (*ConnectRequest, error)
	grpc.ServerStream
}

type Heartbeat

type Heartbeat struct {
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Heartbeat) Descriptor deprecated

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

Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead.

func (*Heartbeat) GetTimestamp

func (x *Heartbeat) GetTimestamp() *timestamppb.Timestamp

func (*Heartbeat) ProtoMessage

func (*Heartbeat) ProtoMessage()

func (*Heartbeat) ProtoReflect

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

func (*Heartbeat) Reset

func (x *Heartbeat) Reset()

func (*Heartbeat) String

func (x *Heartbeat) String() string

type Metrics

type Metrics struct {
	Cpu         float64 `protobuf:"fixed64,1,opt,name=cpu,proto3" json:"cpu,omitempty"`
	Memory      float64 `protobuf:"fixed64,2,opt,name=memory,proto3" json:"memory,omitempty"`
	BytesIn     uint64  `protobuf:"varint,3,opt,name=bytes_in,json=bytesIn,proto3" json:"bytes_in,omitempty"`
	BytesOut    uint64  `protobuf:"varint,4,opt,name=bytes_out,json=bytesOut,proto3" json:"bytes_out,omitempty"`
	ErrorsIn    uint64  `protobuf:"varint,5,opt,name=errors_in,json=errorsIn,proto3" json:"errors_in,omitempty"`
	ErrorsOut   uint64  `protobuf:"varint,6,opt,name=errors_out,json=errorsOut,proto3" json:"errors_out,omitempty"`
	DiscardsIn  uint64  `protobuf:"varint,7,opt,name=discards_in,json=discardsIn,proto3" json:"discards_in,omitempty"`
	DiscardsOut uint64  `protobuf:"varint,8,opt,name=discards_out,json=discardsOut,proto3" json:"discards_out,omitempty"`
	// contains filtered or unexported fields
}

func (*Metrics) Descriptor deprecated

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

Deprecated: Use Metrics.ProtoReflect.Descriptor instead.

func (*Metrics) GetBytesIn

func (x *Metrics) GetBytesIn() uint64

func (*Metrics) GetBytesOut

func (x *Metrics) GetBytesOut() uint64

func (*Metrics) GetCpu

func (x *Metrics) GetCpu() float64

func (*Metrics) GetDiscardsIn

func (x *Metrics) GetDiscardsIn() uint64

func (*Metrics) GetDiscardsOut

func (x *Metrics) GetDiscardsOut() uint64

func (*Metrics) GetErrorsIn

func (x *Metrics) GetErrorsIn() uint64

func (*Metrics) GetErrorsOut

func (x *Metrics) GetErrorsOut() uint64

func (*Metrics) GetMemory

func (x *Metrics) GetMemory() float64

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) ProtoReflect

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

func (*Metrics) Reset

func (x *Metrics) Reset()

func (*Metrics) String

func (x *Metrics) String() string

type Subscribe

type Subscribe struct {
	Type SubscriptionType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.grpc.v1.SubscriptionType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Subscribe) Descriptor deprecated

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

Deprecated: Use Subscribe.ProtoReflect.Descriptor instead.

func (*Subscribe) GetType

func (x *Subscribe) GetType() SubscriptionType

func (*Subscribe) ProtoMessage

func (*Subscribe) ProtoMessage()

func (*Subscribe) ProtoReflect

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

func (*Subscribe) Reset

func (x *Subscribe) Reset()

func (*Subscribe) String

func (x *Subscribe) String() string

type SubscriptionType

type SubscriptionType int32
const (
	SubscriptionType_HEARTBEAT SubscriptionType = 0
	SubscriptionType_METRICS   SubscriptionType = 1
)

func (SubscriptionType) Descriptor

func (SubscriptionType) Enum

func (SubscriptionType) EnumDescriptor deprecated

func (SubscriptionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SubscriptionType.Descriptor instead.

func (SubscriptionType) Number

func (SubscriptionType) String

func (x SubscriptionType) String() string

func (SubscriptionType) Type

type UnimplementedConnectionServiceServer

type UnimplementedConnectionServiceServer struct {
}

UnimplementedConnectionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedConnectionServiceServer) Connect

type UnsafeConnectionServiceServer

type UnsafeConnectionServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeConnectionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConnectionServiceServer will result in compilation errors.

type Unsubscribe

type Unsubscribe struct {
	Type SubscriptionType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.grpc.v1.SubscriptionType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Unsubscribe) Descriptor deprecated

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

Deprecated: Use Unsubscribe.ProtoReflect.Descriptor instead.

func (*Unsubscribe) GetType

func (x *Unsubscribe) GetType() SubscriptionType

func (*Unsubscribe) ProtoMessage

func (*Unsubscribe) ProtoMessage()

func (*Unsubscribe) ProtoReflect

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

func (*Unsubscribe) Reset

func (x *Unsubscribe) Reset()

func (*Unsubscribe) String

func (x *Unsubscribe) String() string

Jump to

Keyboard shortcuts

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