Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) CreateGroup(ctx context.Context, name string, partitions int, partitionSize int, ...) (*PartitionGroup, error)
- func (c *Client) DeleteGroup(ctx context.Context, name string) error
- func (c *Client) GetDatabase(ctx context.Context, name string) (*Database, error)
- func (c *Client) GetDatabases(ctx context.Context) ([]*Database, error)
- func (c *Client) GetGroup(ctx context.Context, name string) (*PartitionGroup, error)
- func (c *Client) GetGroups(ctx context.Context) ([]*PartitionGroup, error)
- 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
- type PartitionGroup
- func (g *PartitionGroup) GetCounter(ctx context.Context, name string) (counter.Counter, error)
- func (g *PartitionGroup) GetElection(ctx context.Context, name string, opts ...election.Option) (election.Election, error)
- func (g *PartitionGroup) GetIndexedMap(ctx context.Context, name string) (indexedmap.IndexedMap, error)
- func (g *PartitionGroup) GetLeaderLatch(ctx context.Context, name string, opts ...leader.Option) (leader.Latch, error)
- func (g *PartitionGroup) GetList(ctx context.Context, name string) (list.List, error)
- func (g *PartitionGroup) GetLock(ctx context.Context, name string) (lock.Lock, error)
- func (g *PartitionGroup) GetLog(ctx context.Context, name string) (log.Log, error)
- func (g *PartitionGroup) GetMap(ctx context.Context, name string, opts ..._map.Option) (_map.Map, error)
- func (g *PartitionGroup) GetSet(ctx context.Context, name string) (set.Set, error)
- func (g *PartitionGroup) GetValue(ctx context.Context, name string) (value.Value, error)
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 (*Client) CreateGroup ¶
func (c *Client) CreateGroup(ctx context.Context, name string, partitions int, partitionSize int, protocol proto.Message) (*PartitionGroup, error)
CreateGroup creates a new partition group Deprecated: Groups have been replaced with Databases and can only be modified by the controller
func (*Client) DeleteGroup ¶
DeleteGroup deletes a partition group via the controller Deprecated: Groups have been replaced with Databases and can only be modified by the controller
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 WithNamespace ¶
WithNamespace configures the client's partition group namespace
func WithSessionTimeout ¶
WithSessionTimeout sets the session timeout for the client
type PartitionGroup ¶
type PartitionGroup struct {
Namespace string
Name string
Partitions int
PartitionSize int
// contains filtered or unexported fields
}
PartitionGroup manages the primitives in a partition group Deprecated: PartitionGroup has been replaced by the Database abstraction
func (*PartitionGroup) GetCounter ¶
GetCounter gets or creates a Counter with the given name
func (*PartitionGroup) GetElection ¶
func (g *PartitionGroup) GetElection(ctx context.Context, name string, opts ...election.Option) (election.Election, error)
GetElection gets or creates an Election with the given name
func (*PartitionGroup) GetIndexedMap ¶
func (g *PartitionGroup) GetIndexedMap(ctx context.Context, name string) (indexedmap.IndexedMap, error)
GetIndexedMap gets or creates a Map with the given name
func (*PartitionGroup) GetLeaderLatch ¶
func (g *PartitionGroup) GetLeaderLatch(ctx context.Context, name string, opts ...leader.Option) (leader.Latch, error)
GetLeaderLatch gets or creates a LeaderLatch with the given name
func (*PartitionGroup) GetMap ¶
func (g *PartitionGroup) GetMap(ctx context.Context, name string, opts ..._map.Option) (_map.Map, error)
GetMap gets or creates a Map with the given name