Documentation ¶
Index ¶
- type Client
- func (c *Client) AppendToStream(ctx context.Context, stream string, sequence uint64, events []EventRequest) ([]string, error)
- func (c *Client) Close() error
- func (c *Client) EventCount(ctx context.Context) (uint64, error)
- func (c *Client) GetEvent(ctx context.Context, id ulid.ULID) (*Event, error)
- func (c *Client) GetStream(ctx context.Context, stream string, sequence uint64, limit uint32) ([]string, error)
- func (c *Client) StreamCount(ctx context.Context) (uint64, error)
- func (c *Client) StreamSequence(ctx context.Context, stream string) (uint64, error)
- func (c *Client) Version(ctx context.Context) (string, error)
- type ClientOptions
- type Event
- type EventRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options ClientOptions) (*Client, error)
func (*Client) AppendToStream ¶
func (*Client) StreamSequence ¶
type ClientOptions ¶
type ClientOptions struct {
Address string
}
func DefaultOptions ¶
func DefaultOptions() ClientOptions
func (ClientOptions) WithAddress ¶
func (opts ClientOptions) WithAddress(address string) ClientOptions
type Event ¶
type Event struct { ID string `json:"id"` Stream string `json:"stream"` Sequence uint64 `json:"sequence"` GlobalSequence uint64 `json:"global_sequence"` Type string `json:"type"` Data []byte `json:"data"` CausationID string `json:"causation_id"` CorrelationID string `json:"correlation_id"` Timestamp time.Time `json:"timestamp"` }
Click to show internal directories.
Click to hide internal directories.