Back to godoc.org

Package v1

v0.3.0
Latest Go to latest

The latest major version is .

Published: Jul 21, 2020 | License: Apache-2.0 | Module: github.com/census-instrumentation/opencensus-proto

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Variables

var File_opencensus_proto_agent_trace_v1_trace_service_proto protoreflect.FileDescriptor

func RegisterTraceServiceHandler

func RegisterTraceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterTraceServiceHandler registers the http handlers for service TraceService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterTraceServiceHandlerClient

func RegisterTraceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TraceServiceClient) error

RegisterTraceServiceHandlerClient registers the http handlers for service TraceService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TraceServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TraceServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TraceServiceClient" to call the correct interceptors.

func RegisterTraceServiceHandlerFromEndpoint

func RegisterTraceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterTraceServiceHandlerFromEndpoint is same as RegisterTraceServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterTraceServiceHandlerServer

func RegisterTraceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TraceServiceServer) error

RegisterTraceServiceHandlerServer registers the http handlers for service TraceService to "mux". UnaryRPC :call TraceServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.

func RegisterTraceServiceServer

func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer)

type CurrentLibraryConfig

type CurrentLibraryConfig struct {

	// This is required only in the first message on the stream or if the
	// previous sent CurrentLibraryConfig message has a different Node (e.g.
	// when the same RPC is used to configure multiple Applications).
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// Current configuration.
	Config *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrentLibraryConfig) Descriptor

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

Deprecated: Use CurrentLibraryConfig.ProtoReflect.Descriptor instead.

func (*CurrentLibraryConfig) GetConfig

func (x *CurrentLibraryConfig) GetConfig() *v11.TraceConfig

func (*CurrentLibraryConfig) GetNode

func (x *CurrentLibraryConfig) GetNode() *v1.Node

func (*CurrentLibraryConfig) ProtoMessage

func (*CurrentLibraryConfig) ProtoMessage()

func (*CurrentLibraryConfig) ProtoReflect

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

func (*CurrentLibraryConfig) Reset

func (x *CurrentLibraryConfig) Reset()

func (*CurrentLibraryConfig) String

func (x *CurrentLibraryConfig) String() string

type ExportTraceServiceRequest

type ExportTraceServiceRequest struct {

	// This is required only in the first message on the stream or if the
	// previous sent ExportTraceServiceRequest message has a different Node (e.g.
	// when the same RPC is used to send Spans from multiple Applications).
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// A list of Spans that belong to the last received Node.
	Spans []*v11.Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"`
	// The resource for the spans in this message that do not have an explicit
	// resource set.
	// If unset, the most recently set resource in the RPC stream applies. It is
	// valid to never be set within a stream, e.g. when no resource info is known.
	Resource *v12.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportTraceServiceRequest) Descriptor

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

Deprecated: Use ExportTraceServiceRequest.ProtoReflect.Descriptor instead.

func (*ExportTraceServiceRequest) GetNode

func (x *ExportTraceServiceRequest) GetNode() *v1.Node

func (*ExportTraceServiceRequest) GetResource

func (x *ExportTraceServiceRequest) GetResource() *v12.Resource

func (*ExportTraceServiceRequest) GetSpans

func (x *ExportTraceServiceRequest) GetSpans() []*v11.Span

func (*ExportTraceServiceRequest) ProtoMessage

func (*ExportTraceServiceRequest) ProtoMessage()

func (*ExportTraceServiceRequest) ProtoReflect

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

func (*ExportTraceServiceRequest) Reset

func (x *ExportTraceServiceRequest) Reset()

func (*ExportTraceServiceRequest) String

func (x *ExportTraceServiceRequest) String() string

type ExportTraceServiceResponse

type ExportTraceServiceResponse struct {
	// contains filtered or unexported fields
}

func (*ExportTraceServiceResponse) Descriptor

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

Deprecated: Use ExportTraceServiceResponse.ProtoReflect.Descriptor instead.

func (*ExportTraceServiceResponse) ProtoMessage

func (*ExportTraceServiceResponse) ProtoMessage()

func (*ExportTraceServiceResponse) ProtoReflect

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

func (*ExportTraceServiceResponse) Reset

func (x *ExportTraceServiceResponse) Reset()

func (*ExportTraceServiceResponse) String

func (x *ExportTraceServiceResponse) String() string

type TraceServiceClient

type TraceServiceClient interface {
	// After initialization, this RPC must be kept alive for the entire life of
	// the application. The agent pushes configs down to applications via a
	// stream.
	Config(ctx context.Context, opts ...grpc.CallOption) (TraceService_ConfigClient, error)
	// For performance reasons, it is recommended to keep this RPC
	// alive for the entire life of the application.
	Export(ctx context.Context, opts ...grpc.CallOption) (TraceService_ExportClient, error)
}

TraceServiceClient is the client API for TraceService 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.

type TraceServiceServer

type TraceServiceServer interface {
	// After initialization, this RPC must be kept alive for the entire life of
	// the application. The agent pushes configs down to applications via a
	// stream.
	Config(TraceService_ConfigServer) error
	// For performance reasons, it is recommended to keep this RPC
	// alive for the entire life of the application.
	Export(TraceService_ExportServer) error
	// contains filtered or unexported methods
}

TraceServiceServer is the server API for TraceService service. All implementations must embed UnimplementedTraceServiceServer for forward compatibility

type TraceService_ConfigClient

type TraceService_ConfigClient interface {
	Send(*CurrentLibraryConfig) error
	Recv() (*UpdatedLibraryConfig, error)
	grpc.ClientStream
}

type TraceService_ConfigServer

type TraceService_ConfigServer interface {
	Send(*UpdatedLibraryConfig) error
	Recv() (*CurrentLibraryConfig, error)
	grpc.ServerStream
}

type TraceService_ExportClient

type TraceService_ExportClient interface {
	Send(*ExportTraceServiceRequest) error
	Recv() (*ExportTraceServiceResponse, error)
	grpc.ClientStream
}

type TraceService_ExportServer

type TraceService_ExportServer interface {
	Send(*ExportTraceServiceResponse) error
	Recv() (*ExportTraceServiceRequest, error)
	grpc.ServerStream
}

type UnimplementedTraceServiceServer

type UnimplementedTraceServiceServer struct {
}

UnimplementedTraceServiceServer must be embedded to have forward compatible implementations.

func (*UnimplementedTraceServiceServer) Config

func (*UnimplementedTraceServiceServer) Config(TraceService_ConfigServer) error

func (*UnimplementedTraceServiceServer) Export

func (*UnimplementedTraceServiceServer) Export(TraceService_ExportServer) error

type UpdatedLibraryConfig

type UpdatedLibraryConfig struct {

	// This field is ignored when the RPC is used to configure only one Application.
	// This is required only in the first message on the stream or if the
	// previous sent UpdatedLibraryConfig message has a different Node.
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// Requested updated configuration.
	Config *v11.TraceConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdatedLibraryConfig) Descriptor

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

Deprecated: Use UpdatedLibraryConfig.ProtoReflect.Descriptor instead.

func (*UpdatedLibraryConfig) GetConfig

func (x *UpdatedLibraryConfig) GetConfig() *v11.TraceConfig

func (*UpdatedLibraryConfig) GetNode

func (x *UpdatedLibraryConfig) GetNode() *v1.Node

func (*UpdatedLibraryConfig) ProtoMessage

func (*UpdatedLibraryConfig) ProtoMessage()

func (*UpdatedLibraryConfig) ProtoReflect

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

func (*UpdatedLibraryConfig) Reset

func (x *UpdatedLibraryConfig) Reset()

func (*UpdatedLibraryConfig) String

func (x *UpdatedLibraryConfig) String() string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier