Documentation
¶
Index ¶
- Variables
- type ConnManager
- func (cm *ConnManager) Close() error
- func (cm *ConnManager) Connect(ctx context.Context) error
- func (cm *ConnManager) GetAttempts() int64
- func (cm *ConnManager) GetConn() *grpc.ClientConn
- func (cm *ConnManager) GetState() ConnectionState
- func (cm *ConnManager) IsRetrying() bool
- func (cm *ConnManager) ResetBackoff()
- func (cm *ConnManager) SetDialOptions(opts []grpc.DialOption)
- func (cm *ConnManager) StateChanges() <-chan ConnectionState
- type ConnectionState
- type Metrics
- type Sender
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnectionClosed = types.NewValidationError("connection", "is closed")
Functions ¶
This section is empty.
Types ¶
type ConnManager ¶ added in v0.3.0
type ConnManager struct {
// contains filtered or unexported fields
}
func NewConnManager ¶ added in v0.3.0
func NewConnManager(endpoint string) *ConnManager
func (*ConnManager) Close ¶ added in v0.3.0
func (cm *ConnManager) Close() error
func (*ConnManager) Connect ¶ added in v0.3.0
func (cm *ConnManager) Connect(ctx context.Context) error
func (*ConnManager) GetAttempts ¶ added in v0.3.3
func (cm *ConnManager) GetAttempts() int64
GetAttempts returns the number of connection attempts made
func (*ConnManager) GetConn ¶ added in v0.3.0
func (cm *ConnManager) GetConn() *grpc.ClientConn
func (*ConnManager) GetState ¶ added in v0.3.1
func (cm *ConnManager) GetState() ConnectionState
func (*ConnManager) IsRetrying ¶ added in v0.3.3
func (cm *ConnManager) IsRetrying() bool
IsRetrying returns whether a retry operation is in progress
func (*ConnManager) ResetBackoff ¶ added in v0.3.3
func (cm *ConnManager) ResetBackoff()
ResetBackoff resets the backoff to its initial state
func (*ConnManager) SetDialOptions ¶ added in v0.3.0
func (cm *ConnManager) SetDialOptions(opts []grpc.DialOption)
func (*ConnManager) StateChanges ¶ added in v0.3.1
func (cm *ConnManager) StateChanges() <-chan ConnectionState
type ConnectionState ¶ added in v0.3.0
type ConnectionState struct {
State connectivity.State
LastChanged time.Time
Endpoint string
}
ConnectionState wraps gRPC connectivity state with additional metadata
type Metrics ¶
type Metrics struct {
EventsSent int64
BatchesSent int64
FailedAttempts int64
LastSendTime time.Time
LastFailureTime time.Time
AverageBatchSize float64
}
Metrics tracks sending statistics
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender handles event sending and metrics
func (*Sender) GetMetrics ¶
Click to show internal directories.
Click to hide internal directories.