plumbing

package
v0.0.0-...-14308cf Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 9

Documentation

Overview

Package plumbing is a generated protocol buffer package.

It is generated from these files:

grpc.proto

It has these top-level messages:

EnvelopeData
PushResponse
SubscriptionRequest
Filter
LogFilter
MetricFilter
Response
BatchResponse
ContainerMetricsRequest
ContainerMetricsResponse
RecentLogsRequest
RecentLogsResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientCredentials

func NewClientCredentials(
	certFile string,
	keyFile string,
	caCertFile string,
	serverName string,
) (credentials.TransportCredentials, error)

NewClientCredentials returns gRPC credentials for dialing.

func NewClientMutualTLSConfig

func NewClientMutualTLSConfig(
	certFile string,
	keyFile string,
	caCertFile string,
	serverName string,
) (*tls.Config, error)

NewClientMutualTLSConfig returns a tls.Config with certs loaded from files and the ServerName set.

func NewServerCredentials

func NewServerCredentials(
	certFile string,
	keyFile string,
	caCertFile string,
	opts ...ConfigOption,
) (credentials.TransportCredentials, error)

NewServerCredentials returns gRPC credentials for a server.

func NewServerMutualTLSConfig

func NewServerMutualTLSConfig(
	certFile string,
	keyFile string,
	caCertFile string,
	opts ...ConfigOption,
) (*tls.Config, error)

NewServerMutualTLSConfig returns a tls.Config with certs loaded from files. The returned tls.Config has configured list of cipher suites.

func NewServerTLSConfig

func NewServerTLSConfig(certFile, keyFile string) (*tls.Config, error)

NewServerTLSConfig creates a new tls.Config that is intended to be used with a non-mutual auth server. The config will be loaded with the provided cert and key.

func NewTLSConfig

func NewTLSConfig() *tls.Config

NewTLSConfig creates a new tls.Config. It defaults InsecureSkipVerify to false and MinVersion to tls.VersionTLS10.

func NewTLSHTTPClient

func NewTLSHTTPClient(cert, key, ca, commonName string) *http.Client

func RegisterDopplerIngestorServer

func RegisterDopplerIngestorServer(s *grpc.Server, srv DopplerIngestorServer)

func RegisterDopplerServer

func RegisterDopplerServer(s *grpc.Server, srv DopplerServer)

Types

type BatchResponse

type BatchResponse struct {
	Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"`
}

func (*BatchResponse) Descriptor

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

func (*BatchResponse) GetPayload

func (m *BatchResponse) GetPayload() [][]byte

func (*BatchResponse) ProtoMessage

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) Reset

func (m *BatchResponse) Reset()

func (*BatchResponse) String

func (m *BatchResponse) String() string

type ConfigOption

type ConfigOption func(*tls.Config)

ConfigOption is used when configuring a new tls.Config.

func WithCipherSuites

func WithCipherSuites(ciphers []string) ConfigOption

WithCipherSuites is used to override the default cipher suites.

type ContainerMetricsRequest

type ContainerMetricsRequest struct {
	AppID string `protobuf:"bytes,1,opt,name=appID" json:"appID,omitempty"`
}

func (*ContainerMetricsRequest) Descriptor

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

func (*ContainerMetricsRequest) GetAppID

func (m *ContainerMetricsRequest) GetAppID() string

func (*ContainerMetricsRequest) ProtoMessage

func (*ContainerMetricsRequest) ProtoMessage()

func (*ContainerMetricsRequest) Reset

func (m *ContainerMetricsRequest) Reset()

func (*ContainerMetricsRequest) String

func (m *ContainerMetricsRequest) String() string

type ContainerMetricsResponse

type ContainerMetricsResponse struct {
	Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"`
}

func (*ContainerMetricsResponse) Descriptor

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

func (*ContainerMetricsResponse) GetPayload

func (m *ContainerMetricsResponse) GetPayload() [][]byte

func (*ContainerMetricsResponse) ProtoMessage

func (*ContainerMetricsResponse) ProtoMessage()

func (*ContainerMetricsResponse) Reset

func (m *ContainerMetricsResponse) Reset()

func (*ContainerMetricsResponse) String

func (m *ContainerMetricsResponse) String() string

type DopplerClient

type DopplerClient interface {
	Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_SubscribeClient, error)
	BatchSubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_BatchSubscribeClient, error)
	ContainerMetrics(ctx context.Context, in *ContainerMetricsRequest, opts ...grpc.CallOption) (*ContainerMetricsResponse, error)
	RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error)
}

func NewDopplerClient

func NewDopplerClient(cc *grpc.ClientConn) DopplerClient

type DopplerIngestorClient

type DopplerIngestorClient interface {
	Pusher(ctx context.Context, opts ...grpc.CallOption) (DopplerIngestor_PusherClient, error)
}

func NewDopplerIngestorClient

func NewDopplerIngestorClient(cc *grpc.ClientConn) DopplerIngestorClient

type DopplerIngestorServer

type DopplerIngestorServer interface {
	Pusher(DopplerIngestor_PusherServer) error
}

type DopplerIngestor_PusherClient

type DopplerIngestor_PusherClient interface {
	Send(*EnvelopeData) error
	CloseAndRecv() (*PushResponse, error)
	grpc.ClientStream
}

type DopplerIngestor_PusherServer

type DopplerIngestor_PusherServer interface {
	SendAndClose(*PushResponse) error
	Recv() (*EnvelopeData, error)
	grpc.ServerStream
}

type Doppler_BatchSubscribeClient

type Doppler_BatchSubscribeClient interface {
	Recv() (*BatchResponse, error)
	grpc.ClientStream
}

type Doppler_BatchSubscribeServer

type Doppler_BatchSubscribeServer interface {
	Send(*BatchResponse) error
	grpc.ServerStream
}

type Doppler_SubscribeClient

type Doppler_SubscribeClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type Doppler_SubscribeServer

type Doppler_SubscribeServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type EnvelopeAverager

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

EnvelopeAverager implements google.golang.org/grpc/stats.Handler and keeps track of the average envelope size emitted by a grpc client. It should be constructed with NewEnvelopeAverager.

Note: Track is on a very "hot" path. Care should be taken while altering any algorithms, and performance must be considered.

func NewEnvelopeAverager

func NewEnvelopeAverager() *EnvelopeAverager

NewEnvelopeAverager creates a new EnvelopeAverager.

func (*EnvelopeAverager) Start

func (a *EnvelopeAverager) Start(interval time.Duration, f func(average float64))

Start invokes the given callback with the average envelope size of the past interval.

func (*EnvelopeAverager) Track

func (a *EnvelopeAverager) Track(count, size int)

Track takes the given envelope size (in bytes) to use in the current average calculation. It can be called by several go-routines.

type EnvelopeData

type EnvelopeData struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}

func (*EnvelopeData) Descriptor

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

func (*EnvelopeData) GetPayload

func (m *EnvelopeData) GetPayload() []byte

func (*EnvelopeData) ProtoMessage

func (*EnvelopeData) ProtoMessage()

func (*EnvelopeData) Reset

func (m *EnvelopeData) Reset()

func (*EnvelopeData) String

func (m *EnvelopeData) String() string

type Filter

type Filter struct {
	AppID string `protobuf:"bytes,1,opt,name=appID" json:"appID,omitempty"`
	// Types that are valid to be assigned to Message:
	//	*Filter_Log
	//	*Filter_Metric
	Message isFilter_Message `protobuf_oneof:"Message"`
}

func (*Filter) Descriptor

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

func (*Filter) GetAppID

func (m *Filter) GetAppID() string

func (*Filter) GetLog

func (m *Filter) GetLog() *LogFilter

func (*Filter) GetMessage

func (m *Filter) GetMessage() isFilter_Message

func (*Filter) GetMetric

func (m *Filter) GetMetric() *MetricFilter

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) Reset

func (m *Filter) Reset()

func (*Filter) String

func (m *Filter) String() string

func (*Filter) XXX_OneofFuncs

func (*Filter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type Filter_Log

type Filter_Log struct {
	Log *LogFilter `protobuf:"bytes,2,opt,name=log,oneof"`
}

type Filter_Metric

type Filter_Metric struct {
	Metric *MetricFilter `protobuf:"bytes,3,opt,name=metric,oneof"`
}

type LogFilter

type LogFilter struct {
}

func (*LogFilter) Descriptor

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

func (*LogFilter) ProtoMessage

func (*LogFilter) ProtoMessage()

func (*LogFilter) Reset

func (m *LogFilter) Reset()

func (*LogFilter) String

func (m *LogFilter) String() string

type MetricFilter

type MetricFilter struct {
}

func (*MetricFilter) Descriptor

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

func (*MetricFilter) ProtoMessage

func (*MetricFilter) ProtoMessage()

func (*MetricFilter) Reset

func (m *MetricFilter) Reset()

func (*MetricFilter) String

func (m *MetricFilter) String() string

type PushResponse

type PushResponse struct {
}

func (*PushResponse) Descriptor

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

func (*PushResponse) ProtoMessage

func (*PushResponse) ProtoMessage()

func (*PushResponse) Reset

func (m *PushResponse) Reset()

func (*PushResponse) String

func (m *PushResponse) String() string

type RecentLogsRequest

type RecentLogsRequest struct {
	AppID string `protobuf:"bytes,1,opt,name=appID" json:"appID,omitempty"`
}

func (*RecentLogsRequest) Descriptor

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

func (*RecentLogsRequest) GetAppID

func (m *RecentLogsRequest) GetAppID() string

func (*RecentLogsRequest) ProtoMessage

func (*RecentLogsRequest) ProtoMessage()

func (*RecentLogsRequest) Reset

func (m *RecentLogsRequest) Reset()

func (*RecentLogsRequest) String

func (m *RecentLogsRequest) String() string

type RecentLogsResponse

type RecentLogsResponse struct {
	Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"`
}

func (*RecentLogsResponse) Descriptor

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

func (*RecentLogsResponse) GetPayload

func (m *RecentLogsResponse) GetPayload() [][]byte

func (*RecentLogsResponse) ProtoMessage

func (*RecentLogsResponse) ProtoMessage()

func (*RecentLogsResponse) Reset

func (m *RecentLogsResponse) Reset()

func (*RecentLogsResponse) String

func (m *RecentLogsResponse) String() string

type Response

type Response struct {
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}

Note: Ideally this would be EnvelopeData but for the time being we do not want to pay the cost of planning an upgrade path for this to be renamed.

func (*Response) Descriptor

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

func (*Response) GetPayload

func (m *Response) GetPayload() []byte

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type SubscriptionRequest

type SubscriptionRequest struct {
	ShardID string  `protobuf:"bytes,1,opt,name=shardID" json:"shardID,omitempty"`
	Filter  *Filter `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"`
}

func (*SubscriptionRequest) Descriptor

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

func (*SubscriptionRequest) GetFilter

func (m *SubscriptionRequest) GetFilter() *Filter

func (*SubscriptionRequest) GetShardID

func (m *SubscriptionRequest) GetShardID() string

func (*SubscriptionRequest) ProtoMessage

func (*SubscriptionRequest) ProtoMessage()

func (*SubscriptionRequest) Reset

func (m *SubscriptionRequest) Reset()

func (*SubscriptionRequest) String

func (m *SubscriptionRequest) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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