v1

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

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 (
	ErrInvalidLengthTraceService = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTraceService   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterTraceServiceHandler added in v0.2.0

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

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

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 RegisterTraceServiceServer

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

Types

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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*CurrentLibraryConfig) Descriptor

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

func (*CurrentLibraryConfig) GetConfig

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

func (*CurrentLibraryConfig) GetNode

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

func (*CurrentLibraryConfig) Marshal added in v0.2.1

func (m *CurrentLibraryConfig) Marshal() (dAtA []byte, err error)

func (*CurrentLibraryConfig) MarshalTo added in v0.2.1

func (m *CurrentLibraryConfig) MarshalTo(dAtA []byte) (int, error)

func (*CurrentLibraryConfig) ProtoMessage

func (*CurrentLibraryConfig) ProtoMessage()

func (*CurrentLibraryConfig) Reset

func (m *CurrentLibraryConfig) Reset()

func (*CurrentLibraryConfig) Size added in v0.2.1

func (m *CurrentLibraryConfig) Size() (n int)

func (*CurrentLibraryConfig) String

func (m *CurrentLibraryConfig) String() string

func (*CurrentLibraryConfig) Unmarshal added in v0.2.1

func (m *CurrentLibraryConfig) Unmarshal(dAtA []byte) error

func (*CurrentLibraryConfig) XXX_DiscardUnknown

func (m *CurrentLibraryConfig) XXX_DiscardUnknown()

func (*CurrentLibraryConfig) XXX_Marshal

func (m *CurrentLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CurrentLibraryConfig) XXX_Merge

func (m *CurrentLibraryConfig) XXX_Merge(src proto.Message)

func (*CurrentLibraryConfig) XXX_Size

func (m *CurrentLibraryConfig) XXX_Size() int

func (*CurrentLibraryConfig) XXX_Unmarshal

func (m *CurrentLibraryConfig) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*ExportTraceServiceRequest) Descriptor

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

func (*ExportTraceServiceRequest) GetNode

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

func (*ExportTraceServiceRequest) GetResource added in v0.1.0

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

func (*ExportTraceServiceRequest) GetSpans

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

func (*ExportTraceServiceRequest) Marshal added in v0.2.1

func (m *ExportTraceServiceRequest) Marshal() (dAtA []byte, err error)

func (*ExportTraceServiceRequest) MarshalTo added in v0.2.1

func (m *ExportTraceServiceRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExportTraceServiceRequest) ProtoMessage

func (*ExportTraceServiceRequest) ProtoMessage()

func (*ExportTraceServiceRequest) Reset

func (m *ExportTraceServiceRequest) Reset()

func (*ExportTraceServiceRequest) Size added in v0.2.1

func (m *ExportTraceServiceRequest) Size() (n int)

func (*ExportTraceServiceRequest) String

func (m *ExportTraceServiceRequest) String() string

func (*ExportTraceServiceRequest) Unmarshal added in v0.2.1

func (m *ExportTraceServiceRequest) Unmarshal(dAtA []byte) error

func (*ExportTraceServiceRequest) XXX_DiscardUnknown

func (m *ExportTraceServiceRequest) XXX_DiscardUnknown()

func (*ExportTraceServiceRequest) XXX_Marshal

func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExportTraceServiceRequest) XXX_Merge

func (m *ExportTraceServiceRequest) XXX_Merge(src proto.Message)

func (*ExportTraceServiceRequest) XXX_Size

func (m *ExportTraceServiceRequest) XXX_Size() int

func (*ExportTraceServiceRequest) XXX_Unmarshal

func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error

type ExportTraceServiceResponse

type ExportTraceServiceResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExportTraceServiceResponse) Descriptor

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

func (*ExportTraceServiceResponse) Marshal added in v0.2.1

func (m *ExportTraceServiceResponse) Marshal() (dAtA []byte, err error)

func (*ExportTraceServiceResponse) MarshalTo added in v0.2.1

func (m *ExportTraceServiceResponse) MarshalTo(dAtA []byte) (int, error)

func (*ExportTraceServiceResponse) ProtoMessage

func (*ExportTraceServiceResponse) ProtoMessage()

func (*ExportTraceServiceResponse) Reset

func (m *ExportTraceServiceResponse) Reset()

func (*ExportTraceServiceResponse) Size added in v0.2.1

func (m *ExportTraceServiceResponse) Size() (n int)

func (*ExportTraceServiceResponse) String

func (m *ExportTraceServiceResponse) String() string

func (*ExportTraceServiceResponse) Unmarshal added in v0.2.1

func (m *ExportTraceServiceResponse) Unmarshal(dAtA []byte) error

func (*ExportTraceServiceResponse) XXX_DiscardUnknown

func (m *ExportTraceServiceResponse) XXX_DiscardUnknown()

func (*ExportTraceServiceResponse) XXX_Marshal

func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExportTraceServiceResponse) XXX_Merge

func (m *ExportTraceServiceResponse) XXX_Merge(src proto.Message)

func (*ExportTraceServiceResponse) XXX_Size

func (m *ExportTraceServiceResponse) XXX_Size() int

func (*ExportTraceServiceResponse) XXX_Unmarshal

func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error

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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTraceServiceClient

func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient

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
}

TraceServiceServer is the server API for TraceService service.

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 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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*UpdatedLibraryConfig) Descriptor

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

func (*UpdatedLibraryConfig) GetConfig

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

func (*UpdatedLibraryConfig) GetNode added in v0.1.0

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

func (*UpdatedLibraryConfig) Marshal added in v0.2.1

func (m *UpdatedLibraryConfig) Marshal() (dAtA []byte, err error)

func (*UpdatedLibraryConfig) MarshalTo added in v0.2.1

func (m *UpdatedLibraryConfig) MarshalTo(dAtA []byte) (int, error)

func (*UpdatedLibraryConfig) ProtoMessage

func (*UpdatedLibraryConfig) ProtoMessage()

func (*UpdatedLibraryConfig) Reset

func (m *UpdatedLibraryConfig) Reset()

func (*UpdatedLibraryConfig) Size added in v0.2.1

func (m *UpdatedLibraryConfig) Size() (n int)

func (*UpdatedLibraryConfig) String

func (m *UpdatedLibraryConfig) String() string

func (*UpdatedLibraryConfig) Unmarshal added in v0.2.1

func (m *UpdatedLibraryConfig) Unmarshal(dAtA []byte) error

func (*UpdatedLibraryConfig) XXX_DiscardUnknown

func (m *UpdatedLibraryConfig) XXX_DiscardUnknown()

func (*UpdatedLibraryConfig) XXX_Marshal

func (m *UpdatedLibraryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdatedLibraryConfig) XXX_Merge

func (m *UpdatedLibraryConfig) XXX_Merge(src proto.Message)

func (*UpdatedLibraryConfig) XXX_Size

func (m *UpdatedLibraryConfig) XXX_Size() int

func (*UpdatedLibraryConfig) XXX_Unmarshal

func (m *UpdatedLibraryConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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