memcluster

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 provides a cluster/client.Client backed by kv/mem transaction store, which stores data in memory instead of in etcd.

func New

func New(serviceOpts kv.OverrideOptions) *Client

New instantiates a client which defaults its stores to the given zone/env/namespace.

func (*Client) KV

func (c *Client) KV() (kv.Store, error)

KV returns/constructs a mem backed kv.Store for the default zone/env/namespace.

func (*Client) Services

func (c *Client) Services(opts services.OverrideOptions) (services.Services, error)

Services constructs a gateway to all cluster services, backed by a mem store.

func (*Client) Store

func (c *Client) Store(opts kv.OverrideOptions) (kv.Store, error)

Store returns/constructs a mem backed kv.Store for the given env/zone/namespace.

func (*Client) Txn

func (c *Client) Txn() (kv.TxnStore, error)

Txn returns/constructs a mem backed kv.TxnStore for the default zone/env/namespace.

func (*Client) TxnStore

func (c *Client) TxnStore(opts kv.OverrideOptions) (kv.TxnStore, error)

TxnStore returns/constructs a mem backed kv.TxnStore for the given env/zone/namespace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL