Documentation ¶
Index ¶
- type Client
- type Database
- func (d *Database) GetCounter(ctx context.Context, name string) (counter.Counter, error)
- func (d *Database) GetElection(ctx context.Context, name string, opts ...election.Option) (election.Election, error)
- func (d *Database) GetIndexedMap(ctx context.Context, name string) (indexedmap.IndexedMap, error)
- func (d *Database) GetLeaderLatch(ctx context.Context, name string, opts ...leader.Option) (leader.Latch, error)
- func (d *Database) GetList(ctx context.Context, name string) (list.List, error)
- func (d *Database) GetLock(ctx context.Context, name string) (lock.Lock, error)
- func (d *Database) GetLog(ctx context.Context, name string) (log.Log, error)
- func (d *Database) GetMap(ctx context.Context, name string, opts ..._map.Option) (_map.Map, error)
- func (d *Database) GetPrimitives(ctx context.Context, opts ...primitive.MetadataOption) ([]primitive.Metadata, error)
- func (d *Database) GetSet(ctx context.Context, name string) (set.Set, error)
- func (d *Database) GetValue(ctx context.Context, name string) (value.Value, error)
- type Option
- func WithApplication(application string) Option
- func WithJoinTimeout(timeout time.Duration) Option
- func WithMemberID(memberID string) Option
- func WithNamespace(namespace string) Option
- func WithPeerHost(host string) Option
- func WithPeerPort(port int) Option
- func WithPeerServerOption(option grpc.ServerOption) Option
- func WithPeerService(service peer.Service) Option
- func WithScope(scope string) Option
- func WithSessionTimeout(timeout time.Duration) Option
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
}
Client is an Atomix client
func NewWithContext ¶
NewWithContext returns a new Atomix client
func (*Client) GetDatabase ¶
GetDatabase gets a database client by name from the client's namespace
func (*Client) GetDatabases ¶
GetDatabases returns a list of all databases in the client's namespace
type Database ¶
Database manages the primitives in a set of partitions
func (*Database) GetCounter ¶
GetCounter gets or creates a Counter with the given name
func (*Database) GetElection ¶
func (d *Database) GetElection(ctx context.Context, name string, opts ...election.Option) (election.Election, error)
GetElection gets or creates an Election with the given name
func (*Database) GetIndexedMap ¶
func (d *Database) GetIndexedMap(ctx context.Context, name string) (indexedmap.IndexedMap, error)
GetIndexedMap gets or creates a Map with the given name
func (*Database) GetLeaderLatch ¶
func (d *Database) GetLeaderLatch(ctx context.Context, name string, opts ...leader.Option) (leader.Latch, error)
GetLeaderLatch gets or creates a LeaderLatch with the given name
func (*Database) GetPrimitives ¶
func (d *Database) GetPrimitives(ctx context.Context, opts ...primitive.MetadataOption) ([]primitive.Metadata, error)
GetPrimitives gets a list of primitives in the database
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option provides a client option
func WithApplication ¶
WithApplication configures the application name for the client Deprecated: Use WithScope instead
func WithJoinTimeout ¶
WithJoinTimeout configures the client's join timeout
func WithMemberID ¶
WithMemberID configures the client's member ID
func WithNamespace ¶
WithNamespace configures the client's partition group namespace
func WithPeerHost ¶
WithPeerHost configures the client's peer host
func WithPeerPort ¶
WithPeerPort configures the client's peer port
func WithPeerServerOption ¶
func WithPeerServerOption(option grpc.ServerOption) Option
WithPeerServerOption configures a server option
func WithPeerService ¶
WithPeerService configures a peer-to-peer service
func WithSessionTimeout ¶
WithSessionTimeout sets the session timeout for the client