grpc

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_sink_grpc_pb_loggie_proto protoreflect.FileDescriptor
View Source
var LogService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.LogService",
	HandlerType: (*LogServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "logStream",
			Handler:       _LogService_LogStream_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "pkg/sink/grpc/pb/loggie.proto",
}

LogService_ServiceDesc is the grpc.ServiceDesc for LogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLogServiceServer

func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)

Types

type LogMsg

type LogMsg struct {
	RawLog []byte `protobuf:"bytes,1,opt,name=rawLog,proto3" json:"rawLog,omitempty"`
	// deprecated
	Header map[string][]byte `` /* 153-byte string literal not displayed */
	// structured log data
	LogBody      map[string][]byte `` /* 155-byte string literal not displayed */
	IsSplit      bool              `protobuf:"varint,4,opt,name=isSplit,proto3" json:"isSplit,omitempty"`
	PackedHeader []byte            `protobuf:"bytes,5,opt,name=packedHeader,proto3" json:"packedHeader,omitempty"`
	// contains filtered or unexported fields
}

func (*LogMsg) Descriptor deprecated

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

Deprecated: Use LogMsg.ProtoReflect.Descriptor instead.

func (*LogMsg) GetHeader

func (x *LogMsg) GetHeader() map[string][]byte

func (*LogMsg) GetIsSplit

func (x *LogMsg) GetIsSplit() bool

func (*LogMsg) GetLogBody

func (x *LogMsg) GetLogBody() map[string][]byte

func (*LogMsg) GetPackedHeader

func (x *LogMsg) GetPackedHeader() []byte

func (*LogMsg) GetRawLog

func (x *LogMsg) GetRawLog() []byte

func (*LogMsg) ProtoMessage

func (*LogMsg) ProtoMessage()

func (*LogMsg) ProtoReflect

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

func (*LogMsg) Reset

func (x *LogMsg) Reset()

func (*LogMsg) String

func (x *LogMsg) String() string

type LogResp

type LogResp struct {
	Success  bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Count    int32  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	ErrorMsg string `protobuf:"bytes,3,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"`
	// contains filtered or unexported fields
}

func (*LogResp) Descriptor deprecated

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

Deprecated: Use LogResp.ProtoReflect.Descriptor instead.

func (*LogResp) GetCount

func (x *LogResp) GetCount() int32

func (*LogResp) GetErrorMsg

func (x *LogResp) GetErrorMsg() string

func (*LogResp) GetSuccess

func (x *LogResp) GetSuccess() bool

func (*LogResp) ProtoMessage

func (*LogResp) ProtoMessage()

func (*LogResp) ProtoReflect

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

func (*LogResp) Reset

func (x *LogResp) Reset()

func (*LogResp) String

func (x *LogResp) String() string

type LogServiceClient

type LogServiceClient interface {
	LogStream(ctx context.Context, opts ...grpc.CallOption) (LogService_LogStreamClient, error)
}

LogServiceClient is the client API for LogService 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 NewLogServiceClient

func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient

type LogServiceServer

type LogServiceServer interface {
	LogStream(LogService_LogStreamServer) error
	// contains filtered or unexported methods
}

LogServiceServer is the server API for LogService service. All implementations must embed UnimplementedLogServiceServer for forward compatibility

type LogService_LogStreamClient

type LogService_LogStreamClient interface {
	Send(*LogMsg) error
	CloseAndRecv() (*LogResp, error)
	grpc.ClientStream
}

type LogService_LogStreamServer

type LogService_LogStreamServer interface {
	SendAndClose(*LogResp) error
	Recv() (*LogMsg, error)
	grpc.ServerStream
}

type UnimplementedLogServiceServer

type UnimplementedLogServiceServer struct {
}

UnimplementedLogServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLogServiceServer) LogStream

type UnsafeLogServiceServer

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

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

Jump to

Keyboard shortcuts

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