package v1
import "go.opentelemetry.io/proto/otlp/collector/logs/v1"
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterLogsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterLogsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LogsServiceClient) error
- func RegisterLogsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
- func RegisterLogsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LogsServiceServer) error
- func RegisterLogsServiceServer(s grpc.ServiceRegistrar, srv LogsServiceServer)
- type ExportLogsPartialSuccess
- func (*ExportLogsPartialSuccess) Descriptor() ([]byte, []int)
- func (x *ExportLogsPartialSuccess) GetErrorMessage() string
- func (x *ExportLogsPartialSuccess) GetRejectedLogRecords() int64
- func (*ExportLogsPartialSuccess) ProtoMessage()
- func (x *ExportLogsPartialSuccess) ProtoReflect() protoreflect.Message
- func (x *ExportLogsPartialSuccess) Reset()
- func (x *ExportLogsPartialSuccess) String() string
- type ExportLogsServiceRequest
- func (*ExportLogsServiceRequest) Descriptor() ([]byte, []int)
- func (x *ExportLogsServiceRequest) GetResourceLogs() []*v1.ResourceLogs
- func (*ExportLogsServiceRequest) ProtoMessage()
- func (x *ExportLogsServiceRequest) ProtoReflect() protoreflect.Message
- func (x *ExportLogsServiceRequest) Reset()
- func (x *ExportLogsServiceRequest) String() string
- type ExportLogsServiceResponse
- func (*ExportLogsServiceResponse) Descriptor() ([]byte, []int)
- func (x *ExportLogsServiceResponse) GetPartialSuccess() *ExportLogsPartialSuccess
- func (*ExportLogsServiceResponse) ProtoMessage()
- func (x *ExportLogsServiceResponse) ProtoReflect() protoreflect.Message
- func (x *ExportLogsServiceResponse) Reset()
- func (x *ExportLogsServiceResponse) String() string
- type LogsServiceClient
- type LogsServiceServer
- type UnimplementedLogsServiceServer
- type UnsafeLogsServiceServer
Variables ¶
var File_opentelemetry_proto_collector_logs_v1_logs_service_proto protoreflect.FileDescriptor
var LogsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "opentelemetry.proto.collector.logs.v1.LogsService", HandlerType: (*LogsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Export", Handler: _LogsService_Export_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "opentelemetry/proto/collector/logs/v1/logs_service.proto", }
LogsService_ServiceDesc is the grpc.ServiceDesc for LogsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLogsServiceHandler ¶
func RegisterLogsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterLogsServiceHandler registers the http handlers for service LogsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterLogsServiceHandlerClient ¶
func RegisterLogsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LogsServiceClient) error
RegisterLogsServiceHandlerClient registers the http handlers for service LogsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "LogsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LogsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "LogsServiceClient" to call the correct interceptors.
func RegisterLogsServiceHandlerFromEndpoint ¶
func RegisterLogsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterLogsServiceHandlerFromEndpoint is same as RegisterLogsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterLogsServiceHandlerServer ¶
func RegisterLogsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LogsServiceServer) error
RegisterLogsServiceHandlerServer registers the http handlers for service LogsService to "mux". UnaryRPC :call LogsServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLogsServiceHandlerFromEndpoint instead.
func RegisterLogsServiceServer ¶
func RegisterLogsServiceServer(s grpc.ServiceRegistrar, srv LogsServiceServer)
Types ¶
type ExportLogsPartialSuccess ¶
type ExportLogsPartialSuccess struct { // The number of rejected log records. // // A `rejected_<signal>` field holding a `0` value indicates that the // request was fully accepted. RejectedLogRecords int64 `protobuf:"varint,1,opt,name=rejected_log_records,json=rejectedLogRecords,proto3" json:"rejected_log_records,omitempty"` // A developer-facing human-readable message in English. It should be used // either to explain why the server rejected parts of the data during a partial // success or to convey warnings/suggestions during a full success. The message // should offer guidance on how users can address such issues. // // error_message is an optional field. An error_message with an empty value // is equivalent to it not being set. ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` // contains filtered or unexported fields }
func (*ExportLogsPartialSuccess) Descriptor ¶
func (*ExportLogsPartialSuccess) Descriptor() ([]byte, []int)
Deprecated: Use ExportLogsPartialSuccess.ProtoReflect.Descriptor instead.
func (*ExportLogsPartialSuccess) GetErrorMessage ¶
func (x *ExportLogsPartialSuccess) GetErrorMessage() string
func (*ExportLogsPartialSuccess) GetRejectedLogRecords ¶
func (x *ExportLogsPartialSuccess) GetRejectedLogRecords() int64
func (*ExportLogsPartialSuccess) ProtoMessage ¶
func (*ExportLogsPartialSuccess) ProtoMessage()
func (*ExportLogsPartialSuccess) ProtoReflect ¶
func (x *ExportLogsPartialSuccess) ProtoReflect() protoreflect.Message
func (*ExportLogsPartialSuccess) Reset ¶
func (x *ExportLogsPartialSuccess) Reset()
func (*ExportLogsPartialSuccess) String ¶
func (x *ExportLogsPartialSuccess) String() string
type ExportLogsServiceRequest ¶
type ExportLogsServiceRequest struct { // An array of ResourceLogs. // For data coming from a single resource this array will typically contain one // element. Intermediary nodes (such as OpenTelemetry Collector) that receive // data from multiple origins typically batch the data before forwarding further and // in that case this array will contain multiple elements. ResourceLogs []*v1.ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"` // contains filtered or unexported fields }
func (*ExportLogsServiceRequest) Descriptor ¶
func (*ExportLogsServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExportLogsServiceRequest.ProtoReflect.Descriptor instead.
func (*ExportLogsServiceRequest) GetResourceLogs ¶
func (x *ExportLogsServiceRequest) GetResourceLogs() []*v1.ResourceLogs
func (*ExportLogsServiceRequest) ProtoMessage ¶
func (*ExportLogsServiceRequest) ProtoMessage()
func (*ExportLogsServiceRequest) ProtoReflect ¶
func (x *ExportLogsServiceRequest) ProtoReflect() protoreflect.Message
func (*ExportLogsServiceRequest) Reset ¶
func (x *ExportLogsServiceRequest) Reset()
func (*ExportLogsServiceRequest) String ¶
func (x *ExportLogsServiceRequest) String() string
type ExportLogsServiceResponse ¶
type ExportLogsServiceResponse struct { // The details of a partially successful export request. // // If the request is only partially accepted // (i.e. when the server accepts only parts of the data and rejects the rest) // the server MUST initialize the `partial_success` field and MUST // set the `rejected_<signal>` with the number of items it rejected. // // Servers MAY also make use of the `partial_success` field to convey // warnings/suggestions to senders even when the request was fully accepted. // In such cases, the `rejected_<signal>` MUST have a value of `0` and // the `error_message` MUST be non-empty. // // A `partial_success` message with an empty value (rejected_<signal> = 0 and // `error_message` = "") is equivalent to it not being set/present. Senders // SHOULD interpret it the same way as in the full success case. PartialSuccess *ExportLogsPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success,omitempty"` // contains filtered or unexported fields }
func (*ExportLogsServiceResponse) Descriptor ¶
func (*ExportLogsServiceResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExportLogsServiceResponse.ProtoReflect.Descriptor instead.
func (*ExportLogsServiceResponse) GetPartialSuccess ¶
func (x *ExportLogsServiceResponse) GetPartialSuccess() *ExportLogsPartialSuccess
func (*ExportLogsServiceResponse) ProtoMessage ¶
func (*ExportLogsServiceResponse) ProtoMessage()
func (*ExportLogsServiceResponse) ProtoReflect ¶
func (x *ExportLogsServiceResponse) ProtoReflect() protoreflect.Message
func (*ExportLogsServiceResponse) Reset ¶
func (x *ExportLogsServiceResponse) Reset()
func (*ExportLogsServiceResponse) String ¶
func (x *ExportLogsServiceResponse) String() string
type LogsServiceClient ¶
type LogsServiceClient interface { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) }
LogsServiceClient is the client API for LogsService 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 NewLogsServiceClient ¶
func NewLogsServiceClient(cc grpc.ClientConnInterface) LogsServiceClient
type LogsServiceServer ¶
type LogsServiceServer interface { // For performance reasons, it is recommended to keep this RPC // alive for the entire life of the application. Export(context.Context, *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) // contains filtered or unexported methods }
LogsServiceServer is the server API for LogsService service. All implementations must embed UnimplementedLogsServiceServer for forward compatibility
type UnimplementedLogsServiceServer ¶
type UnimplementedLogsServiceServer struct { }
UnimplementedLogsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLogsServiceServer) Export ¶
func (UnimplementedLogsServiceServer) Export(context.Context, *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error)
type UnsafeLogsServiceServer ¶
type UnsafeLogsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLogsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogsServiceServer will result in compilation errors.
Source Files ¶
logs_service.pb.go logs_service.pb.gw.go logs_service_grpc.pb.go
- Version
- v1.5.0 (latest)
- Published
- Jan 6, 2025
- Platform
- linux/amd64
- Imports
- 16 packages
- Last checked
- 5 days ago –
Tools for package owners.