store

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDBStore

type BoltDBStore struct {
	// contains filtered or unexported fields
}

func NewBoltDBDataStore

func NewBoltDBDataStore(filePath string, shutdownNotify chan bool) (*BoltDBStore, error)

func (*BoltDBStore) AddLabelsToGroup

func (s *BoltDBStore) AddLabelsToGroup(targetGroup string, labels map[string]string) error

func (*BoltDBStore) AddTargetToGroup

func (s *BoltDBStore) AddTargetToGroup(targetGroup, target string) error

func (*BoltDBStore) GetDB

func (s *BoltDBStore) GetDB() *bolt.DB

func (*BoltDBStore) GetTargetGroupLabels

func (s *BoltDBStore) GetTargetGroupLabels(targetGroup string) (*map[string]string, error)

func (*BoltDBStore) RemoveLabelFromGroup

func (s *BoltDBStore) RemoveLabelFromGroup(targetGroup, label string) error

func (*BoltDBStore) RemoveTargetFromGroup

func (s *BoltDBStore) RemoveTargetFromGroup(targetGroup, target string) error

func (*BoltDBStore) RemoveTargetGroup

func (s *BoltDBStore) RemoveTargetGroup(targetGroup string) error

func (*BoltDBStore) Serialize

func (s *BoltDBStore) Serialize(debug bool) (string, error)

func (*BoltDBStore) Shutdown

func (s *BoltDBStore) Shutdown()

type ConsulLock

type ConsulLock struct {
	// contains filtered or unexported fields
}

Lock stores data for a consul lock

type ConsulStore

type ConsulStore struct {
	// contains filtered or unexported fields
}

func NewConsulDataStore

func NewConsulDataStore(consulHost string, allowStale bool, shutdownNotify chan bool) (*ConsulStore, error)

func (*ConsulStore) AddLabelsToGroup

func (s *ConsulStore) AddLabelsToGroup(targetGroup string, labels map[string]string) error

func (*ConsulStore) AddTargetToGroup

func (s *ConsulStore) AddTargetToGroup(targetGroup, target string) error

func (*ConsulStore) GetTargetGroupLabels

func (s *ConsulStore) GetTargetGroupLabels(targetGroup string) (*map[string]string, error)

func (*ConsulStore) RemoveLabelFromGroup

func (s *ConsulStore) RemoveLabelFromGroup(targetGroup, label string) error

func (*ConsulStore) RemoveTargetFromGroup

func (s *ConsulStore) RemoveTargetFromGroup(targetGroup, target string) error

func (*ConsulStore) RemoveTargetGroup

func (s *ConsulStore) RemoveTargetGroup(targetGroup string) error

func (*ConsulStore) Serialize

func (s *ConsulStore) Serialize(debug bool) (string, error)

func (*ConsulStore) Shutdown

func (s *ConsulStore) Shutdown()

type DataStore

type DataStore interface {
	AddTargetToGroup(targetGroup, target string) error
	RemoveTargetFromGroup(targetGroup, target string) error
	RemoveTargetGroup(targetGroup string) error
	GetTargetGroupLabels(targetGroup string) (*map[string]string, error)
	AddLabelsToGroup(targetGroup string, labels map[string]string) error
	RemoveLabelFromGroup(targetGroup, label string) error
	Serialize(debug bool) (string, error)
	Shutdown()
}
var StoreInstance DataStore

type TargetGroup

type TargetGroup struct {
	Name    string            `json:"-"`
	Targets []string          `json:"targets"`
	Labels  map[string]string `json:"labels"`
}

func (*TargetGroup) SetLabels

func (ts *TargetGroup) SetLabels(labels map[string]string)

Jump to

Keyboard shortcuts

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