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
- type ProxyOptions
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:"-" msgpack:"-"`
OnAck func() `json:"-" yaml:"-" msgpack:"-"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetLastError ¶
type ClientOptions ¶
type ClientOptions struct {
Identity Identity `json:"identity" yaml:"identity" msgpack:"identity"`
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty" msgpack:"hostname,omitempty"`
Platform string `json:"platform,omitempty" yaml:"platform,omitempty" msgpack:"platform,omitempty"`
Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty" msgpack:"architecture,omitempty"`
Mapping protocol.MappingDescriptor `json:"mapping,omitempty" yaml:"mapping,omitempty" msgpack:"mapping,omitempty"`
Mappings []protocol.MappingDescriptor `json:"mappings,omitempty" yaml:"mappings,omitempty" msgpack:"mappings,omitempty"`
Indexing []protocol.IndexDescriptor `json:"indexing,omitempty" yaml:"indexing,omitempty" msgpack:"indexing,omitempty"`
BufferOptions AckBufferOptions `json:"buffer_options,omitempty" yaml:"buffer_options,omitempty" msgpack:"buffer_options,omitempty"`
IsCompressed bool `json:"is_compressed,omitempty" yaml:"is_compressed,omitempty" msgpack:"is_compressed,omitempty"`
SensorSeedKey string `json:"sensor_seed_key" yaml:"sensor_seed_key" msgpack:"sensor_seed_key"`
DebugLog func(string) `json:"-" yaml:"-" msgpack:"-"`
OnError func(error) `json:"-" yaml:"-" msgpack:"-"`
OnWarning func(string) `json:"-" yaml:"-" msgpack:"-"`
// Auto-detect if not specified (preferred).
DestURL string `json:"dest_url,omitempty" yaml:"dest_url,omitempty" msgpack:"dest_url,omitempty"`
GenURL func() string `json:"-" yaml:"-" msgpack:"-"`
// Simple flag to operate the client as a sink for testing.
TestSinkMode bool `json:"-" yaml:"-" msgpack:"-"`
// Proxy configuration for connecting to LimaCharlie cloud
Proxy ProxyOptions `json:"proxy,omitempty" yaml:"proxy,omitempty" msgpack:"proxy,omitempty"`
}
func (ClientOptions) Validate ¶
func (o ClientOptions) Validate() error
type ProxyOptions ¶ added in v1.5.0
type ProxyOptions struct {
URL string `json:"url,omitempty" yaml:"url,omitempty" msgpack:"url,omitempty"`
Username string `json:"username,omitempty" yaml:"username,omitempty" msgpack:"username,omitempty"`
Password string `json:"password,omitempty" yaml:"password,omitempty" msgpack:"password,omitempty"`
HandshakeTimeout time.Duration `json:"handshake_timeout,omitempty" yaml:"handshake_timeout,omitempty" msgpack:"handshake_timeout,omitempty"`
ConnectTimeout time.Duration `json:"connect_timeout,omitempty" yaml:"connect_timeout,omitempty" msgpack:"connect_timeout,omitempty"`
ReadWriteTimeout time.Duration `json:"read_write_timeout,omitempty" yaml:"read_write_timeout,omitempty" msgpack:"read_write_timeout,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.