Documentation ¶
Overview ¶
Package etcdfs file provides an implementation of the FileSystem interface based on the contents of a etcd.
Index ¶
- func New(c *EtcdClient) vfs.FileSystem
- type EtcdClient
- func (p *EtcdClient) Clear() error
- func (p *EtcdClient) Close() error
- func (p *EtcdClient) DelValues(keys ...string) error
- func (p *EtcdClient) DelValuesWithPrefix(keyPrefixs ...string) error
- func (p *EtcdClient) Get(key string) (val string, ok bool)
- func (p *EtcdClient) GetAllValues() (map[string]string, error)
- func (p *EtcdClient) GetStructValue(keyPrefix string, out interface{}) error
- func (p *EtcdClient) GetValues(keys ...string) (map[string]string, error)
- func (p *EtcdClient) GetValuesByPrefix(keyPrefix string) (map[string]string, error)
- func (p *EtcdClient) Set(key, val string) error
- func (p *EtcdClient) SetStructValue(keyPrefix string, val interface{}) error
- func (p *EtcdClient) SetValues(m map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(c *EtcdClient) vfs.FileSystem
New returns a new FileSystem from the provided etcd. Wtcd keys should be forward slash-separated pathnames and not contain a leading slash.
Types ¶
type EtcdClient ¶
func NewEtcdClient ¶
func NewEtcdClient(endpoints []string, timeout time.Duration) (*EtcdClient, error)
func NewEtcdClientWithConfig ¶
func NewEtcdClientWithConfig(cfg clientv3.Config) (*EtcdClient, error)
func (*EtcdClient) Clear ¶
func (p *EtcdClient) Clear() error
func (*EtcdClient) Close ¶
func (p *EtcdClient) Close() error
func (*EtcdClient) DelValues ¶
func (p *EtcdClient) DelValues(keys ...string) error
func (*EtcdClient) DelValuesWithPrefix ¶
func (p *EtcdClient) DelValuesWithPrefix(keyPrefixs ...string) error
func (*EtcdClient) GetAllValues ¶
func (p *EtcdClient) GetAllValues() (map[string]string, error)
func (*EtcdClient) GetStructValue ¶
func (p *EtcdClient) GetStructValue(keyPrefix string, out interface{}) error
func (*EtcdClient) GetValues ¶
func (p *EtcdClient) GetValues(keys ...string) (map[string]string, error)
func (*EtcdClient) GetValuesByPrefix ¶
func (p *EtcdClient) GetValuesByPrefix(keyPrefix string) (map[string]string, error)
func (*EtcdClient) Set ¶
func (p *EtcdClient) Set(key, val string) error
func (*EtcdClient) SetStructValue ¶
func (p *EtcdClient) SetStructValue(keyPrefix string, val interface{}) error
Click to show internal directories.
Click to hide internal directories.