Documentation ¶
Index ¶
- Variables
- type AckBuffer
- func (b *AckBuffer) Ack(seq uint64) error
- func (b *AckBuffer) Add(e *protocol.DataMessage, timeout time.Duration) bool
- func (b *AckBuffer) Close()
- func (b *AckBuffer) GetCurrentCapacity() uint64
- func (b *AckBuffer) GetEmptyEvent() *Event
- func (b *AckBuffer) GetNextToDeliver(timeout time.Duration) *protocol.DataMessage
- func (b *AckBuffer) GetUnAcked() ([]*protocol.DataMessage, error)
- func (b *AckBuffer) ResetDelivery()
- func (b *AckBuffer) UpdateCapacity(newCapacity uint64)
- type AckBufferOptions
- type Client
- func (c *Client) Close() ([]*protocol.DataMessage, error)
- func (c *Client) Drain(timeout time.Duration) error
- func (c *Client) GetLastError() error
- func (c *Client) GetUnsent() ([]*protocol.DataMessage, error)
- func (c *Client) Reconnect()
- func (c *Client) Ship(message *protocol.DataMessage, timeout time.Duration) error
- type ClientOptions
- type Event
- type Identity
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorBufferFull = errors.New("buffer full")
Functions ¶
This section is empty.
Types ¶
type AckBuffer ¶
func NewAckBuffer ¶
func NewAckBuffer(o AckBufferOptions) (*AckBuffer, error)
func (*AckBuffer) GetCurrentCapacity ¶
func (*AckBuffer) GetEmptyEvent ¶
func (*AckBuffer) GetNextToDeliver ¶
func (b *AckBuffer) GetNextToDeliver(timeout time.Duration) *protocol.DataMessage
func (*AckBuffer) GetUnAcked ¶
func (b *AckBuffer) GetUnAcked() ([]*protocol.DataMessage, error)
func (*AckBuffer) ResetDelivery ¶
func (b *AckBuffer) ResetDelivery()
func (*AckBuffer) UpdateCapacity ¶
type AckBufferOptions ¶
type AckBufferOptions struct { OnBackPressure func() `json:"-" yaml:"-"` OnAck func() `json:"-" yaml:"-"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(o ClientOptions) (*Client, error)
func (*Client) GetLastError ¶
type ClientOptions ¶
type ClientOptions struct { Identity Identity `json:"identity" yaml:"identity"` Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` Platform string `json:"platform,omitempty" yaml:"platform,omitempty"` Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"` Mapping protocol.MappingDescriptor `json:"mapping,omitempty" yaml:"mapping,omitempty"` Mappings []protocol.MappingDescriptor `json:"mappings,omitempty" yaml:"mappings,omitempty"` Indexing []protocol.IndexDescriptor `json:"indexing,omitempty" yaml:"indexing,omitempty"` BufferOptions AckBufferOptions `json:"buffer_options,omitempty" yaml:"buffer_options,omitempty"` IsCompressed bool `json:"is_compressed,omitempty" yaml:"is_compressed,omitempty"` SensorSeedKey string `json:"sensor_seed_key" yaml:"sensor_seed_key"` DebugLog func(string) `json:"-" yaml:"-"` OnError func(error) `json:"-" yaml:"-"` OnWarning func(string) `json:"-" yaml:"-"` // Auto-detect if not specified (preferred). DestURL string `json:"dest_url,omitempty" yaml:"dest_url,omitempty"` GenURL func() string `json:"-" yaml:"-"` }
func (ClientOptions) Validate ¶
func (o ClientOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.