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_metrics_v1_metrics_service_proto protoreflect.FileDescriptor

func RegisterMetricsServiceHandler

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

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

func RegisterMetricsServiceHandlerClient

func RegisterMetricsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsServiceClient) error

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

func RegisterMetricsServiceHandlerFromEndpoint

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

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

func RegisterMetricsServiceHandlerServer

func RegisterMetricsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsServiceServer) error

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

func RegisterMetricsServiceServer

func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer)

type ExportMetricsServiceRequest

type ExportMetricsServiceRequest struct {

	// This is required only in the first message on the stream or if the
	// previous sent ExportMetricsServiceRequest message has a different Node (e.g.
	// when the same RPC is used to send Metrics from multiple Applications).
	Node *v1.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// A list of metrics that belong to the last received Node.
	Metrics []*v11.Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// The resource for the metrics 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
	// at all or when all sent metrics have an explicit resource set.
	Resource *v12.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*ExportMetricsServiceRequest) Descriptor

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

Deprecated: Use ExportMetricsServiceRequest.ProtoReflect.Descriptor instead.

func (*ExportMetricsServiceRequest) GetMetrics

func (x *ExportMetricsServiceRequest) GetMetrics() []*v11.Metric

func (*ExportMetricsServiceRequest) GetNode

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

func (*ExportMetricsServiceRequest) GetResource

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

func (*ExportMetricsServiceRequest) ProtoMessage

func (*ExportMetricsServiceRequest) ProtoMessage()

func (*ExportMetricsServiceRequest) ProtoReflect

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

func (*ExportMetricsServiceRequest) Reset

func (x *ExportMetricsServiceRequest) Reset()

func (*ExportMetricsServiceRequest) String

func (x *ExportMetricsServiceRequest) String() string

type ExportMetricsServiceResponse

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

func (*ExportMetricsServiceResponse) Descriptor

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

Deprecated: Use ExportMetricsServiceResponse.ProtoReflect.Descriptor instead.

func (*ExportMetricsServiceResponse) ProtoMessage

func (*ExportMetricsServiceResponse) ProtoMessage()

func (*ExportMetricsServiceResponse) ProtoReflect

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

func (*ExportMetricsServiceResponse) Reset

func (x *ExportMetricsServiceResponse) Reset()

func (*ExportMetricsServiceResponse) String

func (x *ExportMetricsServiceResponse) String() string

type MetricsServiceClient

type MetricsServiceClient interface {
	// 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) (MetricsService_ExportClient, error)
}

MetricsServiceClient is the client API for MetricsService 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 MetricsServiceServer

type MetricsServiceServer interface {
	// For performance reasons, it is recommended to keep this RPC
	// alive for the entire life of the application.
	Export(MetricsService_ExportServer) error
	// contains filtered or unexported methods
}

MetricsServiceServer is the server API for MetricsService service. All implementations must embed UnimplementedMetricsServiceServer for forward compatibility

type MetricsService_ExportClient

type MetricsService_ExportClient interface {
	Send(*ExportMetricsServiceRequest) error
	Recv() (*ExportMetricsServiceResponse, error)
	grpc.ClientStream
}

type MetricsService_ExportServer

type MetricsService_ExportServer interface {
	Send(*ExportMetricsServiceResponse) error
	Recv() (*ExportMetricsServiceRequest, error)
	grpc.ServerStream
}

type UnimplementedMetricsServiceServer

type UnimplementedMetricsServiceServer struct {
}

UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations.

func (*UnimplementedMetricsServiceServer) Export

func (*UnimplementedMetricsServiceServer) Export(MetricsService_ExportServer) error

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