Documentation ¶
Index ¶
- type Bolt
- func (b *Bolt) AddAccount(id, target string) error
- func (b *Bolt) AddLabelLink(account string, source, target []string) error
- func (b *Bolt) AddRoute(target, labelKey string) error
- func (b *Bolt) AddService(accId, labelKey, serviceId, serviceType string) error
- func (b *Bolt) CertStorage() *CertStorage
- func (b *Bolt) CheckAccount(id string) bool
- func (b *Bolt) CreateDefaultRoute(accId, labelKey string) (bool, error)
- func (b *Bolt) Empty() bool
- func (b *Bolt) FindLabelLink(source []string) (string, []string, error)
- func (b *Bolt) GetConfig(key string) ([]byte, error)
- func (b *Bolt) HandlingHostname(name string) bool
- func (b *Bolt) KnownTarget(name string) bool
- func (b *Bolt) LabelsForTarget(target string) (string, string, error)
- func (b *Bolt) LookupService(accId, labelKey string) (string, string, error)
- func (b *Bolt) SetConfig(key string, val []byte) error
- type CertStorage
- func (c *CertStorage) Delete(key string) error
- func (c *CertStorage) Exists(key string) bool
- func (c *CertStorage) List(prefix string, recursive bool) ([]string, error)
- func (c *CertStorage) Load(key string) ([]byte, error)
- func (c *CertStorage) Lock(key string) error
- func (c *CertStorage) Stat(key string) (certmagic.KeyInfo, error)
- func (c *CertStorage) Store(key string, value []byte) error
- func (c *CertStorage) Unlock(key string) error
- type Memory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bolt ¶
type Bolt struct { L hclog.Logger // contains filtered or unexported fields }
func (*Bolt) AddAccount ¶
func (*Bolt) AddLabelLink ¶
func (*Bolt) AddService ¶
func (*Bolt) CertStorage ¶
func (b *Bolt) CertStorage() *CertStorage
func (*Bolt) CheckAccount ¶
func (*Bolt) CreateDefaultRoute ¶
func (*Bolt) FindLabelLink ¶
func (*Bolt) HandlingHostname ¶
func (*Bolt) KnownTarget ¶
func (*Bolt) LabelsForTarget ¶
func (*Bolt) LookupService ¶
type CertStorage ¶
type CertStorage struct {
// contains filtered or unexported fields
}
func (*CertStorage) Exists ¶
func (c *CertStorage) Exists(key string) bool
Exists returns true if the key exists and there was no error checking.
func (*CertStorage) List ¶
func (c *CertStorage) List(prefix string, recursive bool) ([]string, error)
List returns all keys that match prefix. If recursive is true, non-terminal keys will be enumerated (i.e. "directories" should be walked); otherwise, only keys prefixed exactly by prefix will be listed.
func (*CertStorage) Load ¶
func (c *CertStorage) Load(key string) ([]byte, error)
Load retrieves the value at key.
func (*CertStorage) Lock ¶
func (c *CertStorage) Lock(key string) error
Lock acquires the lock for key, blocking until the lock can be obtained or an error is returned. Note that, even after acquiring a lock, an idempotent operation may have already been performed by another process that acquired the lock before - so always check to make sure idempotent operations still need to be performed after acquiring the lock.
The actual implementation of obtaining of a lock must be an atomic operation so that multiple Lock calls at the same time always results in only one caller receiving the lock at any given time.
To prevent deadlocks, all implementations (where this concern is relevant) should put a reasonable expiration on the lock in case Unlock is unable to be called due to some sort of network failure or system crash.
func (*CertStorage) Stat ¶
func (c *CertStorage) Stat(key string) (certmagic.KeyInfo, error)
Stat returns information about key.
func (*CertStorage) Store ¶
func (c *CertStorage) Store(key string, value []byte) error
Store puts value at key.
func (*CertStorage) Unlock ¶
func (c *CertStorage) Unlock(key string) error
Unlock releases the lock for key. This method must ONLY be called after a successful call to Lock, and only after the critical section is finished, even if it errored or timed out. Unlock cleans up any resources allocated during Lock.