Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterConnectorServiceServer(s grpc.ServiceRegistrar, srv ConnectorServiceServer)
- type ConnectorRequest
- func (*ConnectorRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectorRequest) GetProxyRequest() *v1.Request
- func (x *ConnectorRequest) GetRequestId() string
- func (*ConnectorRequest) ProtoMessage()
- func (x *ConnectorRequest) ProtoReflect() protoreflect.Message
- func (x *ConnectorRequest) Reset()
- func (x *ConnectorRequest) String() string
- type ConnectorResponse
- func (*ConnectorResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectorResponse) GetProxyResponse() *v1.Response
- func (x *ConnectorResponse) GetRequestId() string
- func (*ConnectorResponse) ProtoMessage()
- func (x *ConnectorResponse) ProtoReflect() protoreflect.Message
- func (x *ConnectorResponse) Reset()
- func (x *ConnectorResponse) String() string
- type ConnectorServiceClient
- type ConnectorServiceServer
- type ConnectorService_RelayRequestsClient
- type ConnectorService_RelayRequestsServer
- type LogBatch
- type LogEntry
- func (*LogEntry) Descriptor() ([]byte, []int)deprecated
- func (x *LogEntry) GetCaller() string
- func (x *LogEntry) GetFieldsJson() string
- func (x *LogEntry) GetLevel() LogEntry_Level
- func (x *LogEntry) GetLoggerName() string
- func (x *LogEntry) GetMessage() string
- func (x *LogEntry) GetStackTrace() string
- func (x *LogEntry) GetTimestampNs() int64
- func (*LogEntry) ProtoMessage()
- func (x *LogEntry) ProtoReflect() protoreflect.Message
- func (x *LogEntry) Reset()
- func (x *LogEntry) String() string
- type LogEntry_Level
- func (LogEntry_Level) Descriptor() protoreflect.EnumDescriptor
- func (x LogEntry_Level) Enum() *LogEntry_Level
- func (LogEntry_Level) EnumDescriptor() ([]byte, []int)deprecated
- func (x LogEntry_Level) Number() protoreflect.EnumNumber
- func (x LogEntry_Level) String() string
- func (LogEntry_Level) Type() protoreflect.EnumType
- type UnimplementedConnectorServiceServer
- type UnsafeConnectorServiceServer
Constants ¶
const ( ConnectorService_RelayRequests_FullMethodName = "/sgnl.connector.v1.ConnectorService/RelayRequests" ConnectorService_RelayLogs_FullMethodName = "/sgnl.connector.v1.ConnectorService/RelayLogs" )
Variables ¶
var ( LogEntry_Level_name = map[int32]string{ 0: "DEBUG", 1: "INFO", 2: "WARN", 3: "ERROR", } LogEntry_Level_value = map[string]int32{ "DEBUG": 0, "INFO": 1, "WARN": 2, "ERROR": 3, } )
Enum value maps for LogEntry_Level.
var ConnectorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sgnl.connector.v1.ConnectorService", HandlerType: (*ConnectorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RelayLogs", Handler: _ConnectorService_RelayLogs_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "RelayRequests", Handler: _ConnectorService_RelayRequests_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/connector/v1/connector.proto", }
ConnectorService_ServiceDesc is the grpc.ServiceDesc for ConnectorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_connector_v1_connector_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConnectorServiceServer ¶
func RegisterConnectorServiceServer(s grpc.ServiceRegistrar, srv ConnectorServiceServer)
Types ¶
type ConnectorRequest ¶
type ConnectorRequest struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ProxyRequest *v1.Request `protobuf:"bytes,2,opt,name=proxy_request,json=proxyRequest,proto3" json:"proxy_request,omitempty"`
// contains filtered or unexported fields
}
Wrapper messages with request IDs for request/response correlate
func (*ConnectorRequest) Descriptor
deprecated
func (*ConnectorRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConnectorRequest.ProtoReflect.Descriptor instead.
func (*ConnectorRequest) GetProxyRequest ¶
func (x *ConnectorRequest) GetProxyRequest() *v1.Request
func (*ConnectorRequest) GetRequestId ¶
func (x *ConnectorRequest) GetRequestId() string
func (*ConnectorRequest) ProtoMessage ¶
func (*ConnectorRequest) ProtoMessage()
func (*ConnectorRequest) ProtoReflect ¶
func (x *ConnectorRequest) ProtoReflect() protoreflect.Message
func (*ConnectorRequest) Reset ¶
func (x *ConnectorRequest) Reset()
func (*ConnectorRequest) String ¶
func (x *ConnectorRequest) String() string
type ConnectorResponse ¶
type ConnectorResponse struct {
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ProxyResponse *v1.Response `protobuf:"bytes,2,opt,name=proxy_response,json=proxyResponse,proto3" json:"proxy_response,omitempty"`
// contains filtered or unexported fields
}
func (*ConnectorResponse) Descriptor
deprecated
func (*ConnectorResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConnectorResponse.ProtoReflect.Descriptor instead.
func (*ConnectorResponse) GetProxyResponse ¶
func (x *ConnectorResponse) GetProxyResponse() *v1.Response
func (*ConnectorResponse) GetRequestId ¶
func (x *ConnectorResponse) GetRequestId() string
func (*ConnectorResponse) ProtoMessage ¶
func (*ConnectorResponse) ProtoMessage()
func (*ConnectorResponse) ProtoReflect ¶
func (x *ConnectorResponse) ProtoReflect() protoreflect.Message
func (*ConnectorResponse) Reset ¶
func (x *ConnectorResponse) Reset()
func (*ConnectorResponse) String ¶
func (x *ConnectorResponse) String() string
type ConnectorServiceClient ¶
type ConnectorServiceClient interface {
// Bidirectional streaming RPC for request relay
// The initial stream metadata should contain:
// - connector_id: Unique ID for the connector
// - client_id: Client identifier
// - auth_token: Auth Token
// - version: Connector version
// - labels: Optional metadata as key-value pairs
RelayRequests(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ConnectorResponse, ConnectorRequest], error)
// Unary RPC for relaying log batches from connector to service
// Uses the same authentication as RelayRequests (via metadata)
// Returns Empty on success, error on failure
RelayLogs(ctx context.Context, in *LogBatch, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
ConnectorServiceClient is the client API for ConnectorService 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.
ConnectorService is a gRPC service implemented by the Connector Service to relay requests from the Adapters and Action Handlers to the remote on-premises connectors.
func NewConnectorServiceClient ¶
func NewConnectorServiceClient(cc grpc.ClientConnInterface) ConnectorServiceClient
type ConnectorServiceServer ¶
type ConnectorServiceServer interface {
// Bidirectional streaming RPC for request relay
// The initial stream metadata should contain:
// - connector_id: Unique ID for the connector
// - client_id: Client identifier
// - auth_token: Auth Token
// - version: Connector version
// - labels: Optional metadata as key-value pairs
RelayRequests(grpc.BidiStreamingServer[ConnectorResponse, ConnectorRequest]) error
// Unary RPC for relaying log batches from connector to service
// Uses the same authentication as RelayRequests (via metadata)
// Returns Empty on success, error on failure
RelayLogs(context.Context, *LogBatch) (*emptypb.Empty, error)
// contains filtered or unexported methods
}
ConnectorServiceServer is the server API for ConnectorService service. All implementations must embed UnimplementedConnectorServiceServer for forward compatibility.
ConnectorService is a gRPC service implemented by the Connector Service to relay requests from the Adapters and Action Handlers to the remote on-premises connectors.
type ConnectorService_RelayRequestsClient ¶
type ConnectorService_RelayRequestsClient = grpc.BidiStreamingClient[ConnectorResponse, ConnectorRequest]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ConnectorService_RelayRequestsServer ¶
type ConnectorService_RelayRequestsServer = grpc.BidiStreamingServer[ConnectorResponse, ConnectorRequest]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type LogBatch ¶ added in v0.20.0
type LogBatch struct {
Entries []*LogEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
LastDroppedCount uint32 `protobuf:"varint,5,opt,name=last_dropped_count,json=lastDroppedCount,proto3" json:"last_dropped_count,omitempty"` // Count of logs dropped
// contains filtered or unexported fields
}
LogBatch contains a batch of log entries from the connector
func (*LogBatch) Descriptor
deprecated
added in
v0.20.0
func (*LogBatch) GetEntries ¶ added in v0.20.0
func (*LogBatch) GetLastDroppedCount ¶ added in v0.20.0
func (*LogBatch) ProtoMessage ¶ added in v0.20.0
func (*LogBatch) ProtoMessage()
func (*LogBatch) ProtoReflect ¶ added in v0.20.0
func (x *LogBatch) ProtoReflect() protoreflect.Message
type LogEntry ¶ added in v0.20.0
type LogEntry struct {
TimestampNs int64 `protobuf:"varint,1,opt,name=timestamp_ns,json=timestampNs,proto3" json:"timestamp_ns,omitempty"`
Level LogEntry_Level `protobuf:"varint,2,opt,name=level,proto3,enum=sgnl.connector.v1.LogEntry_Level" json:"level,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
FieldsJson string `protobuf:"bytes,4,opt,name=fields_json,json=fieldsJson,proto3" json:"fields_json,omitempty"` // Structured fields as JSON
LoggerName string `protobuf:"bytes,5,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"`
Caller string `protobuf:"bytes,6,opt,name=caller,proto3" json:"caller,omitempty"` // file:line
StackTrace string `protobuf:"bytes,7,opt,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"` // Only for ERROR level
// contains filtered or unexported fields
}
LogEntry represents a single log entry
func (*LogEntry) Descriptor
deprecated
added in
v0.20.0
func (*LogEntry) GetFieldsJson ¶ added in v0.20.0
func (*LogEntry) GetLevel ¶ added in v0.20.0
func (x *LogEntry) GetLevel() LogEntry_Level
func (*LogEntry) GetLoggerName ¶ added in v0.20.0
func (*LogEntry) GetMessage ¶ added in v0.20.0
func (*LogEntry) GetStackTrace ¶ added in v0.20.0
func (*LogEntry) GetTimestampNs ¶ added in v0.20.0
func (*LogEntry) ProtoMessage ¶ added in v0.20.0
func (*LogEntry) ProtoMessage()
func (*LogEntry) ProtoReflect ¶ added in v0.20.0
func (x *LogEntry) ProtoReflect() protoreflect.Message
type LogEntry_Level ¶ added in v0.20.0
type LogEntry_Level int32
Log level
const ( LogEntry_DEBUG LogEntry_Level = 0 LogEntry_INFO LogEntry_Level = 1 LogEntry_WARN LogEntry_Level = 2 LogEntry_ERROR LogEntry_Level = 3 )
func (LogEntry_Level) Descriptor ¶ added in v0.20.0
func (LogEntry_Level) Descriptor() protoreflect.EnumDescriptor
func (LogEntry_Level) Enum ¶ added in v0.20.0
func (x LogEntry_Level) Enum() *LogEntry_Level
func (LogEntry_Level) EnumDescriptor
deprecated
added in
v0.20.0
func (LogEntry_Level) EnumDescriptor() ([]byte, []int)
Deprecated: Use LogEntry_Level.Descriptor instead.
func (LogEntry_Level) Number ¶ added in v0.20.0
func (x LogEntry_Level) Number() protoreflect.EnumNumber
func (LogEntry_Level) String ¶ added in v0.20.0
func (x LogEntry_Level) String() string
func (LogEntry_Level) Type ¶ added in v0.20.0
func (LogEntry_Level) Type() protoreflect.EnumType
type UnimplementedConnectorServiceServer ¶
type UnimplementedConnectorServiceServer struct{}
UnimplementedConnectorServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedConnectorServiceServer) RelayRequests ¶
func (UnimplementedConnectorServiceServer) RelayRequests(grpc.BidiStreamingServer[ConnectorResponse, ConnectorRequest]) error
type UnsafeConnectorServiceServer ¶
type UnsafeConnectorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConnectorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConnectorServiceServer will result in compilation errors.