v1

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 18 Imported by: 11

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_opencensus_proto_agent_metrics_v1_metrics_service_proto protoreflect.FileDescriptor

Functions

func RegisterMetricsServiceHandler added in v0.2.1

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 added in v0.2.1

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 added in v0.2.1

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 added in v0.3.0

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. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMetricsServiceHandlerFromEndpoint instead.

func RegisterMetricsServiceServer

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

Types

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 deprecated

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 added in v0.3.0

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 deprecated

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

Deprecated: Use ExportMetricsServiceResponse.ProtoReflect.Descriptor instead.

func (*ExportMetricsServiceResponse) ProtoMessage

func (*ExportMetricsServiceResponse) ProtoMessage()

func (*ExportMetricsServiceResponse) ProtoReflect added in v0.3.0

func (*ExportMetricsServiceResponse) Reset

func (x *ExportMetricsServiceResponse) Reset()

func (*ExportMetricsServiceResponse) 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://godoc.org/google.golang.org/grpc#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
}

MetricsServiceServer is the server API for MetricsService service.

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 added in v0.2.1

type UnimplementedMetricsServiceServer struct {
}

UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMetricsServiceServer) Export added in v0.2.1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL