Documentation ¶
Index ¶
- Variables
- func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
- type Grpc
- type HttpLogService
- type LogAuthService
- type LogData
- type LogMessage
- func (*LogMessage) Descriptor() ([]byte, []int)deprecated
- func (x *LogMessage) GetData() []string
- func (x *LogMessage) GetLogType() string
- func (x *LogMessage) GetType() agent.ConnectorType
- func (*LogMessage) ProtoMessage()
- func (x *LogMessage) ProtoReflect() protoreflect.Message
- func (x *LogMessage) Reset()
- func (x *LogMessage) String() string
- type LogOutputService
- type LogService
- type LogServiceClient
- type LogServiceServer
- type ReceivedMessage
- func (*ReceivedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ReceivedMessage) GetMessage() string
- func (x *ReceivedMessage) GetReceived() bool
- func (*ReceivedMessage) ProtoMessage()
- func (x *ReceivedMessage) ProtoReflect() protoreflect.Message
- func (x *ReceivedMessage) Reset()
- func (x *ReceivedMessage) String() string
- type UnimplementedLogServiceServer
- type UnsafeLogServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_log_proto protoreflect.FileDescriptor
var LogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "logservice.LogService", HandlerType: (*LogServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ProcessLogs", Handler: _LogService_ProcessLogs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "log.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 Grpc ¶
type Grpc struct { UnimplementedLogServiceServer OutputService *LogOutputService }
func (*Grpc) ProcessLogs ¶
func (s *Grpc) ProcessLogs(_ context.Context, req *LogMessage) (*ReceivedMessage, error)
type HttpLogService ¶
func NewHttpLogService ¶
func NewHttpLogService() *HttpLogService
type LogAuthService ¶
type LogAuthService struct { Mutex *sync.Mutex CollectorKeyCache []string AgentKeyCache []string ConnectionKeyCache string }
func NewLogAuthService ¶
func NewLogAuthService() *LogAuthService
func (*LogAuthService) GetConnectionKey ¶
func (auth *LogAuthService) GetConnectionKey() string
func (*LogAuthService) IsConnectionKeyValid ¶
func (auth *LogAuthService) IsConnectionKeyValid(connectionKey string) bool
func (*LogAuthService) IsKeyValid ¶
func (auth *LogAuthService) IsKeyValid(key string, typ agent.ConnectorType) bool
func (*LogAuthService) SyncAuth ¶
func (auth *LogAuthService) SyncAuth()
type LogMessage ¶
type LogMessage struct { Type agent.ConnectorType `protobuf:"varint,1,opt,name=type,proto3,enum=agent.ConnectorType" json:"type,omitempty"` LogType string `protobuf:"bytes,2,opt,name=log_type,json=logType,proto3" json:"log_type,omitempty"` Data []string `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*LogMessage) Descriptor
deprecated
func (*LogMessage) Descriptor() ([]byte, []int)
Deprecated: Use LogMessage.ProtoReflect.Descriptor instead.
func (*LogMessage) GetData ¶
func (x *LogMessage) GetData() []string
func (*LogMessage) GetLogType ¶
func (x *LogMessage) GetLogType() string
func (*LogMessage) GetType ¶
func (x *LogMessage) GetType() agent.ConnectorType
func (*LogMessage) ProtoMessage ¶
func (*LogMessage) ProtoMessage()
func (*LogMessage) ProtoReflect ¶
func (x *LogMessage) ProtoReflect() protoreflect.Message
func (*LogMessage) Reset ¶
func (x *LogMessage) Reset()
func (*LogMessage) String ¶
func (x *LogMessage) String() string
type LogOutputService ¶
type LogOutputService struct { Connections map[config.LogType]string Mutex sync.Mutex Ticker *time.Ticker Client *http.Client }
func NewLogOutputService ¶
func NewLogOutputService() *LogOutputService
func (*LogOutputService) SendBulkLog ¶
func (out *LogOutputService) SendBulkLog(logType config.LogType, logDataArray []string)
func (*LogOutputService) SendLog ¶
func (out *LogOutputService) SendLog(logType config.LogType, logData string)
func (*LogOutputService) SyncOutputs ¶
func (out *LogOutputService) SyncOutputs()
type LogService ¶
type LogService struct {
// contains filtered or unexported fields
}
func (*LogService) LogBulkData ¶
func (l *LogService) LogBulkData(logType config.LogType, data []string)
type LogServiceClient ¶
type LogServiceClient interface {
ProcessLogs(ctx context.Context, in *LogMessage, opts ...grpc.CallOption) (*ReceivedMessage, 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 { ProcessLogs(context.Context, *LogMessage) (*ReceivedMessage, error) // contains filtered or unexported methods }
LogServiceServer is the server API for LogService service. All implementations must embed UnimplementedLogServiceServer for forward compatibility
type ReceivedMessage ¶
type ReceivedMessage struct { Received bool `protobuf:"varint,1,opt,name=received,proto3" json:"received,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ReceivedMessage) Descriptor
deprecated
func (*ReceivedMessage) Descriptor() ([]byte, []int)
Deprecated: Use ReceivedMessage.ProtoReflect.Descriptor instead.
func (*ReceivedMessage) GetMessage ¶
func (x *ReceivedMessage) GetMessage() string
func (*ReceivedMessage) GetReceived ¶
func (x *ReceivedMessage) GetReceived() bool
func (*ReceivedMessage) ProtoMessage ¶
func (*ReceivedMessage) ProtoMessage()
func (*ReceivedMessage) ProtoReflect ¶
func (x *ReceivedMessage) ProtoReflect() protoreflect.Message
func (*ReceivedMessage) Reset ¶
func (x *ReceivedMessage) Reset()
func (*ReceivedMessage) String ¶
func (x *ReceivedMessage) String() string
type UnimplementedLogServiceServer ¶
type UnimplementedLogServiceServer struct { }
UnimplementedLogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLogServiceServer) ProcessLogs ¶
func (UnimplementedLogServiceServer) ProcessLogs(context.Context, *LogMessage) (*ReceivedMessage, error)
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.