Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterRepeaterServer(s grpc.ServiceRegistrar, srv RepeaterServer)
- type Log
- type LogLevel
- type RepeaterClient
- type RepeaterServer
- type Repeater_LogStreamClient
- type Repeater_LogStreamServer
- type Repeater_StreamClient
- type Repeater_StreamServer
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetCorrelation() int64
- func (x *Request) GetData() []byte
- func (x *Request) GetUrl() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- type UnimplementedRepeaterServer
- type UnsafeRepeaterServer
Constants ¶
const ( Repeater_Stream_FullMethodName = "/repeater.v1.Repeater/Stream" Repeater_LogStream_FullMethodName = "/repeater.v1.Repeater/LogStream" )
Variables ¶
var ( LogLevel_name = map[int32]string{ 0: "DEBUG", 1: "INFO", 2: "WARN", 3: "ERROR", } LogLevel_value = map[string]int32{ "DEBUG": 0, "INFO": 1, "WARN": 2, "ERROR": 3, } )
Enum value maps for LogLevel.
var File_repeater_v1_main_proto protoreflect.FileDescriptor
var Repeater_ServiceDesc = grpc.ServiceDesc{ ServiceName: "repeater.v1.Repeater", HandlerType: (*RepeaterServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Stream", Handler: _Repeater_Stream_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "LogStream", Handler: _Repeater_LogStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "repeater/v1/main.proto", }
Repeater_ServiceDesc is the grpc.ServiceDesc for Repeater service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRepeaterServer ¶
func RegisterRepeaterServer(s grpc.ServiceRegistrar, srv RepeaterServer)
Types ¶
type Log ¶
type Log struct { // date Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp"` // log level Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=repeater.v1.LogLevel" json:"level"` // log message Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"` // contains filtered or unexported fields }
func (*Log) Descriptor
deprecated
func (*Log) GetMessage ¶
func (*Log) GetTimestamp ¶
func (x *Log) GetTimestamp() *timestamppb.Timestamp
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
type LogLevel ¶
type LogLevel int32
func (LogLevel) Descriptor ¶
func (LogLevel) Descriptor() protoreflect.EnumDescriptor
func (LogLevel) EnumDescriptor
deprecated
func (LogLevel) Number ¶
func (x LogLevel) Number() protoreflect.EnumNumber
func (LogLevel) Type ¶
func (LogLevel) Type() protoreflect.EnumType
type RepeaterClient ¶
type RepeaterClient interface { Stream(ctx context.Context, opts ...grpc.CallOption) (Repeater_StreamClient, error) LogStream(ctx context.Context, opts ...grpc.CallOption) (Repeater_LogStreamClient, error) }
RepeaterClient is the client API for Repeater 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 NewRepeaterClient ¶
func NewRepeaterClient(cc grpc.ClientConnInterface) RepeaterClient
type RepeaterServer ¶
type RepeaterServer interface { Stream(Repeater_StreamServer) error LogStream(Repeater_LogStreamServer) error // contains filtered or unexported methods }
RepeaterServer is the server API for Repeater service. All implementations must embed UnimplementedRepeaterServer for forward compatibility
type Repeater_StreamClient ¶
type Repeater_StreamServer ¶
type Request ¶
type Request struct { // TCP payload Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` // Need to pass URL as the data is the TCP payload Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url"` // link request and response Correlation int64 `protobuf:"varint,3,opt,name=correlation,proto3" json:"correlation"` // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) GetCorrelation ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { // TCP response Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` // link request and response Correlation int64 `protobuf:"varint,3,opt,name=correlation,proto3" json:"correlation"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetCorrelation ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedRepeaterServer ¶
type UnimplementedRepeaterServer struct { }
UnimplementedRepeaterServer must be embedded to have forward compatible implementations.
func (UnimplementedRepeaterServer) LogStream ¶
func (UnimplementedRepeaterServer) LogStream(Repeater_LogStreamServer) error
func (UnimplementedRepeaterServer) Stream ¶
func (UnimplementedRepeaterServer) Stream(Repeater_StreamServer) error
type UnsafeRepeaterServer ¶
type UnsafeRepeaterServer interface {
// contains filtered or unexported methods
}
UnsafeRepeaterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RepeaterServer will result in compilation errors.