Documentation ¶
Index ¶
- Variables
- func NewClientCredentials(certFile string, keyFile string, caCertFile string, serverName string) (credentials.TransportCredentials, error)
- func NewServerCredentials(certFile string, keyFile string, caCertFile string, opts ...ConfigOption) (credentials.TransportCredentials, error)
- func RegisterDopplerIngestorServer(s grpc.ServiceRegistrar, srv DopplerIngestorServer)
- func RegisterDopplerServer(s grpc.ServiceRegistrar, srv DopplerServer)
- type BatchResponse
- type ConfigOption
- type DopplerClient
- type DopplerIngestorClient
- type DopplerIngestorServer
- type DopplerIngestor_PusherClient
- type DopplerIngestor_PusherServer
- type DopplerPool
- type DopplerServer
- type Doppler_BatchSubscribeClient
- type Doppler_BatchSubscribeServer
- type Doppler_SubscribeClient
- type Doppler_SubscribeServer
- type EnvelopeAverager
- type EnvelopeData
- type Event
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)deprecated
- func (x *Filter) GetAppID() string
- func (x *Filter) GetLog() *LogFilter
- func (m *Filter) GetMessage() isFilter_Message
- func (x *Filter) GetMetric() *MetricFilter
- func (*Filter) ProtoMessage()
- func (x *Filter) ProtoReflect() protoreflect.Message
- func (x *Filter) Reset()
- func (x *Filter) String() string
- type Filter_Log
- type Filter_Metric
- type Finder
- type GRPCConnector
- type LogFilter
- type LogWriter
- type MetricClient
- type MetricFilter
- type Pool
- type PushResponse
- type Response
- type StaticFinder
- type SubscriptionRequest
- func (*SubscriptionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscriptionRequest) GetFilter() *Filter
- func (x *SubscriptionRequest) GetShardID() string
- func (*SubscriptionRequest) ProtoMessage()
- func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message
- func (x *SubscriptionRequest) Reset()
- func (x *SubscriptionRequest) String() string
- type UnimplementedDopplerIngestorServer
- type UnimplementedDopplerServer
- type UnsafeDopplerIngestorServer
- type UnsafeDopplerServer
Constants ¶
This section is empty.
Variables ¶
var DopplerIngestor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plumbing.DopplerIngestor", HandlerType: (*DopplerIngestorServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Pusher", Handler: _DopplerIngestor_Pusher_Handler, ClientStreams: true, }, }, Metadata: "loggregator-release/src/plumbing/doppler.proto", }
DopplerIngestor_ServiceDesc is the grpc.ServiceDesc for DopplerIngestor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Doppler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plumbing.Doppler", HandlerType: (*DopplerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _Doppler_Subscribe_Handler, ServerStreams: true, }, { StreamName: "BatchSubscribe", Handler: _Doppler_BatchSubscribe_Handler, ServerStreams: true, }, }, Metadata: "loggregator-release/src/plumbing/doppler.proto", }
Doppler_ServiceDesc is the grpc.ServiceDesc for Doppler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_loggregator_release_src_plumbing_doppler_proto protoreflect.FileDescriptor
Functions ¶
func NewClientCredentials ¶
func NewClientCredentials( certFile string, keyFile string, caCertFile string, serverName string, ) (credentials.TransportCredentials, error)
NewClientCredentials returns gRPC credentials for dialing.
func NewServerCredentials ¶
func NewServerCredentials( certFile string, keyFile string, caCertFile string, opts ...ConfigOption, ) (credentials.TransportCredentials, error)
NewServerCredentials returns gRPC credentials for a server.
func RegisterDopplerIngestorServer ¶
func RegisterDopplerIngestorServer(s grpc.ServiceRegistrar, srv DopplerIngestorServer)
func RegisterDopplerServer ¶
func RegisterDopplerServer(s grpc.ServiceRegistrar, srv DopplerServer)
Types ¶
type BatchResponse ¶
type BatchResponse struct { Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*BatchResponse) Descriptor
deprecated
func (*BatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use BatchResponse.ProtoReflect.Descriptor instead.
func (*BatchResponse) GetPayload ¶
func (x *BatchResponse) GetPayload() [][]byte
func (*BatchResponse) ProtoMessage ¶
func (*BatchResponse) ProtoMessage()
func (*BatchResponse) ProtoReflect ¶
func (x *BatchResponse) ProtoReflect() protoreflect.Message
func (*BatchResponse) Reset ¶
func (x *BatchResponse) Reset()
func (*BatchResponse) String ¶
func (x *BatchResponse) String() string
type ConfigOption ¶
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 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) }
DopplerClient is the client API for Doppler 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.
func NewDopplerClient ¶
func NewDopplerClient(cc grpc.ClientConnInterface) DopplerClient
type DopplerIngestorClient ¶
type DopplerIngestorClient interface {
Pusher(ctx context.Context, opts ...grpc.CallOption) (DopplerIngestor_PusherClient, error)
}
DopplerIngestorClient is the client API for DopplerIngestor 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.
func NewDopplerIngestorClient ¶
func NewDopplerIngestorClient(cc grpc.ClientConnInterface) DopplerIngestorClient
type DopplerIngestorServer ¶
type DopplerIngestorServer interface { Pusher(DopplerIngestor_PusherServer) error // contains filtered or unexported methods }
DopplerIngestorServer is the server API for DopplerIngestor service. All implementations must embed UnimplementedDopplerIngestorServer for forward compatibility
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 DopplerPool ¶
type DopplerPool interface { RegisterDoppler(addr string) Subscribe(dopplerAddr string, ctx context.Context, req *SubscriptionRequest) (Doppler_BatchSubscribeClient, error) Close(dopplerAddr string) }
DopplerPool creates a pool of doppler gRPC connections
type DopplerServer ¶
type DopplerServer interface { Subscribe(*SubscriptionRequest, Doppler_SubscribeServer) error BatchSubscribe(*SubscriptionRequest, Doppler_BatchSubscribeServer) error // contains filtered or unexported methods }
DopplerServer is the server API for Doppler service. All implementations must embed UnimplementedDopplerServer for forward compatibility
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"` // contains filtered or unexported fields }
func (*EnvelopeData) Descriptor
deprecated
func (*EnvelopeData) Descriptor() ([]byte, []int)
Deprecated: Use EnvelopeData.ProtoReflect.Descriptor instead.
func (*EnvelopeData) GetPayload ¶
func (x *EnvelopeData) GetPayload() []byte
func (*EnvelopeData) ProtoMessage ¶
func (*EnvelopeData) ProtoMessage()
func (*EnvelopeData) ProtoReflect ¶
func (x *EnvelopeData) ProtoReflect() protoreflect.Message
func (*EnvelopeData) Reset ¶
func (x *EnvelopeData) Reset()
func (*EnvelopeData) String ¶
func (x *EnvelopeData) String() string
type Filter ¶
type Filter struct { AppID string `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"` // Types that are assignable to Message: // *Filter_Log // *Filter_Metric Message isFilter_Message `protobuf_oneof:"Message"` // contains filtered or unexported fields }
func (*Filter) Descriptor
deprecated
func (*Filter) GetMessage ¶
func (m *Filter) GetMessage() isFilter_Message
func (*Filter) GetMetric ¶
func (x *Filter) GetMetric() *MetricFilter
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) ProtoReflect ¶
func (x *Filter) ProtoReflect() protoreflect.Message
type Filter_Log ¶
type Filter_Log struct {
Log *LogFilter `protobuf:"bytes,2,opt,name=log,proto3,oneof"`
}
type Filter_Metric ¶
type Filter_Metric struct {
Metric *MetricFilter `protobuf:"bytes,3,opt,name=metric,proto3,oneof"`
}
type Finder ¶
type Finder interface {
Next() Event
}
Finder yields events that tell us what dopplers are available.
type GRPCConnector ¶
type GRPCConnector struct {
// contains filtered or unexported fields
}
GRPCConnector establishes GRPC connections to dopplers and allows calls to Firehose, Stream, etc to be reduced down to a single Receiver.
func NewGRPCConnector ¶
func NewGRPCConnector( bufferSize int, pool DopplerPool, f Finder, m MetricClient, ) *GRPCConnector
NewGRPCConnector creates a new GRPCConnector.
func (*GRPCConnector) Subscribe ¶
func (c *GRPCConnector) Subscribe(ctx context.Context, req *SubscriptionRequest) (recv func() ([]byte, error), err error)
Subscribe returns a Receiver that yields all corresponding messages from Doppler
type LogFilter ¶
type LogFilter struct {
// contains filtered or unexported fields
}
func (*LogFilter) Descriptor
deprecated
func (*LogFilter) ProtoMessage ¶
func (*LogFilter) ProtoMessage()
func (*LogFilter) ProtoReflect ¶
func (x *LogFilter) ProtoReflect() protoreflect.Message
type MetricClient ¶
type MetricClient interface {
NewCounter(name string, opts ...metricemitter.MetricOption) *metricemitter.Counter
}
MetricClient creates new CounterMetrics to be emitted periodically.
type MetricFilter ¶
type MetricFilter struct {
// contains filtered or unexported fields
}
func (*MetricFilter) Descriptor
deprecated
func (*MetricFilter) Descriptor() ([]byte, []int)
Deprecated: Use MetricFilter.ProtoReflect.Descriptor instead.
func (*MetricFilter) ProtoMessage ¶
func (*MetricFilter) ProtoMessage()
func (*MetricFilter) ProtoReflect ¶
func (x *MetricFilter) ProtoReflect() protoreflect.Message
func (*MetricFilter) Reset ¶
func (x *MetricFilter) Reset()
func (*MetricFilter) String ¶
func (x *MetricFilter) String() string
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewPool ¶
func NewPool(opts ...grpc.DialOption) *Pool
func (*Pool) RegisterDoppler ¶
func (*Pool) Subscribe ¶
func (p *Pool) Subscribe(dopplerAddr string, ctx context.Context, req *SubscriptionRequest) (Doppler_BatchSubscribeClient, error)
type PushResponse ¶
type PushResponse struct {
// contains filtered or unexported fields
}
func (*PushResponse) Descriptor
deprecated
func (*PushResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.
func (*PushResponse) ProtoMessage ¶
func (*PushResponse) ProtoMessage()
func (*PushResponse) ProtoReflect ¶
func (x *PushResponse) ProtoReflect() protoreflect.Message
func (*PushResponse) Reset ¶
func (x *PushResponse) Reset()
func (*PushResponse) String ¶
func (x *PushResponse) String() string
type Response ¶
type Response struct { Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
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
deprecated
func (*Response) GetPayload ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type StaticFinder ¶
type StaticFinder struct {
// contains filtered or unexported fields
}
func NewStaticFinder ¶
func NewStaticFinder(addrs []string) *StaticFinder
func (*StaticFinder) Next ¶
func (f *StaticFinder) Next() Event
func (*StaticFinder) Start ¶
func (f *StaticFinder) Start()
func (*StaticFinder) Stop ¶
func (f *StaticFinder) Stop()
type SubscriptionRequest ¶
type SubscriptionRequest struct { ShardID string `protobuf:"bytes,1,opt,name=shardID,proto3" json:"shardID,omitempty"` Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
func (*SubscriptionRequest) Descriptor
deprecated
func (*SubscriptionRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscriptionRequest.ProtoReflect.Descriptor instead.
func (*SubscriptionRequest) GetFilter ¶
func (x *SubscriptionRequest) GetFilter() *Filter
func (*SubscriptionRequest) GetShardID ¶
func (x *SubscriptionRequest) GetShardID() string
func (*SubscriptionRequest) ProtoMessage ¶
func (*SubscriptionRequest) ProtoMessage()
func (*SubscriptionRequest) ProtoReflect ¶
func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message
func (*SubscriptionRequest) Reset ¶
func (x *SubscriptionRequest) Reset()
func (*SubscriptionRequest) String ¶
func (x *SubscriptionRequest) String() string
type UnimplementedDopplerIngestorServer ¶
type UnimplementedDopplerIngestorServer struct { }
UnimplementedDopplerIngestorServer must be embedded to have forward compatible implementations.
func (UnimplementedDopplerIngestorServer) Pusher ¶
func (UnimplementedDopplerIngestorServer) Pusher(DopplerIngestor_PusherServer) error
type UnimplementedDopplerServer ¶
type UnimplementedDopplerServer struct { }
UnimplementedDopplerServer must be embedded to have forward compatible implementations.
func (UnimplementedDopplerServer) BatchSubscribe ¶
func (UnimplementedDopplerServer) BatchSubscribe(*SubscriptionRequest, Doppler_BatchSubscribeServer) error
func (UnimplementedDopplerServer) Subscribe ¶
func (UnimplementedDopplerServer) Subscribe(*SubscriptionRequest, Doppler_SubscribeServer) error
type UnsafeDopplerIngestorServer ¶
type UnsafeDopplerIngestorServer interface {
// contains filtered or unexported methods
}
UnsafeDopplerIngestorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DopplerIngestorServer will result in compilation errors.
type UnsafeDopplerServer ¶
type UnsafeDopplerServer interface {
// contains filtered or unexported methods
}
UnsafeDopplerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DopplerServer will result in compilation errors.