Documentation ¶
Overview ¶
Package consul is a generated GoMock package.
Index ¶
- type Consulet
- func (consul *Consulet) AddKeyValue(key string, value []byte) (err error)
- func (consul *Consulet) CreateNewSemaphore(path string, limit int) (sema *api.Semaphore, err error)
- func (consul *Consulet) Detail() string
- func (consul *Consulet) GetKeyValue(key string) (pair *api.KVPair, err error)
- func (consul *Consulet) GetKeyValues(prefix string) (pairs api.KVPairs, err error)
- func (consul *Consulet) GetKeys(prefix string) (keys []string, err error)
- func (consul *Consulet) IsConnected() bool
- func (consul *Consulet) RegisterService(addr string, port int, name string) (err error)
- func (consul *Consulet) RemoveService(name string) error
- func (consul *Consulet) RemoveValue(key string) (err error)
- func (consul *Consulet) RemoveValues(prefix string) (err error)
- type Consuletty
- type MockConsuletty
- func (m *MockConsuletty) AddKeyValue(key string, value []byte) error
- func (m *MockConsuletty) Detail() string
- func (m *MockConsuletty) EXPECT() *MockConsulettyMockRecorder
- func (m *MockConsuletty) GetKeyValue(key string) (*api.KVPair, error)
- func (m *MockConsuletty) GetKeyValues(prefix string) (api.KVPairs, error)
- func (m *MockConsuletty) GetKeys(prefix string) ([]string, error)
- func (m *MockConsuletty) IsConnected() bool
- func (m *MockConsuletty) RegisterService(addr string, port int, name string) error
- func (m *MockConsuletty) RemoveService(name string) error
- func (m *MockConsuletty) RemoveValue(key string) error
- func (m *MockConsuletty) RemoveValues(prefix string) error
- type MockConsulettyMockRecorder
- func (mr *MockConsulettyMockRecorder) AddKeyValue(key, value interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) Detail() *gomock.Call
- func (mr *MockConsulettyMockRecorder) GetKeyValue(key interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) GetKeyValues(prefix interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) GetKeys(prefix interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) IsConnected() *gomock.Call
- func (mr *MockConsulettyMockRecorder) RegisterService(addr, port, name interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) RemoveService(name interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) RemoveValue(key interface{}) *gomock.Call
- func (mr *MockConsulettyMockRecorder) RemoveValues(prefix interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consulet ¶
Consulet is a wrapper for interfacing with consul
func (*Consulet) AddKeyValue ¶
TODO: should key value operations be atomic??? Can switch to use CAS
func (*Consulet) CreateNewSemaphore ¶
func (*Consulet) GetKeyValue ¶
GetKeyValue gets key/value at specified key
func (*Consulet) GetKeyValues ¶
GetKeyValue gets key/value list at specified prefix
func (*Consulet) IsConnected ¶
func (*Consulet) RegisterService ¶
RegisterService registers a service at specified host, port, with name
func (*Consulet) RemoveService ¶
RemoveService removes a service by name
func (*Consulet) RemoveValue ¶
RemoveValue removes value at specified key
func (*Consulet) RemoveValues ¶
Remove values at specified prefix (like `consul kv delete -recurse /prefix`)
type Consuletty ¶
type Consuletty interface { AddKeyValue(key string, value []byte) error RemoveValue(key string) error RemoveValues(prefix string) error GetKeys(prefix string) (keys []string, err error) GetKeyValue(key string) (*api.KVPair, error) GetKeyValues(prefix string) (api.KVPairs, error) RegisterService(addr string, port int, name string) error RemoveService(name string) error IsConnected() bool Detail() string }
type MockConsuletty ¶
type MockConsuletty struct {
// contains filtered or unexported fields
}
MockConsuletty is a mock of Consuletty interface
func NewMockConsuletty ¶
func NewMockConsuletty(ctrl *gomock.Controller) *MockConsuletty
NewMockConsuletty creates a new mock instance
func (*MockConsuletty) AddKeyValue ¶
func (m *MockConsuletty) AddKeyValue(key string, value []byte) error
AddKeyValue mocks base method
func (*MockConsuletty) EXPECT ¶
func (m *MockConsuletty) EXPECT() *MockConsulettyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockConsuletty) GetKeyValue ¶
func (m *MockConsuletty) GetKeyValue(key string) (*api.KVPair, error)
GetKeyValue mocks base method
func (*MockConsuletty) GetKeyValues ¶
func (m *MockConsuletty) GetKeyValues(prefix string) (api.KVPairs, error)
GetKeyValues mocks base method
func (*MockConsuletty) GetKeys ¶
func (m *MockConsuletty) GetKeys(prefix string) ([]string, error)
GetKeys mocks base method
func (*MockConsuletty) IsConnected ¶
func (m *MockConsuletty) IsConnected() bool
IsConnected mocks base method
func (*MockConsuletty) RegisterService ¶
func (m *MockConsuletty) RegisterService(addr string, port int, name string) error
RegisterService mocks base method
func (*MockConsuletty) RemoveService ¶
func (m *MockConsuletty) RemoveService(name string) error
RemoveService mocks base method
func (*MockConsuletty) RemoveValue ¶
func (m *MockConsuletty) RemoveValue(key string) error
RemoveValue mocks base method
func (*MockConsuletty) RemoveValues ¶
func (m *MockConsuletty) RemoveValues(prefix string) error
RemoveValues mocks base method
type MockConsulettyMockRecorder ¶
type MockConsulettyMockRecorder struct {
// contains filtered or unexported fields
}
MockConsulettyMockRecorder is the mock recorder for MockConsuletty
func (*MockConsulettyMockRecorder) AddKeyValue ¶
func (mr *MockConsulettyMockRecorder) AddKeyValue(key, value interface{}) *gomock.Call
AddKeyValue indicates an expected call of AddKeyValue
func (*MockConsulettyMockRecorder) Detail ¶
func (mr *MockConsulettyMockRecorder) Detail() *gomock.Call
Detail indicates an expected call of Detail
func (*MockConsulettyMockRecorder) GetKeyValue ¶
func (mr *MockConsulettyMockRecorder) GetKeyValue(key interface{}) *gomock.Call
GetKeyValue indicates an expected call of GetKeyValue
func (*MockConsulettyMockRecorder) GetKeyValues ¶
func (mr *MockConsulettyMockRecorder) GetKeyValues(prefix interface{}) *gomock.Call
GetKeyValues indicates an expected call of GetKeyValues
func (*MockConsulettyMockRecorder) GetKeys ¶
func (mr *MockConsulettyMockRecorder) GetKeys(prefix interface{}) *gomock.Call
GetKeys indicates an expected call of GetKeys
func (*MockConsulettyMockRecorder) IsConnected ¶
func (mr *MockConsulettyMockRecorder) IsConnected() *gomock.Call
IsConnected indicates an expected call of IsConnected
func (*MockConsulettyMockRecorder) RegisterService ¶
func (mr *MockConsulettyMockRecorder) RegisterService(addr, port, name interface{}) *gomock.Call
RegisterService indicates an expected call of RegisterService
func (*MockConsulettyMockRecorder) RemoveService ¶
func (mr *MockConsulettyMockRecorder) RemoveService(name interface{}) *gomock.Call
RemoveService indicates an expected call of RemoveService
func (*MockConsulettyMockRecorder) RemoveValue ¶
func (mr *MockConsulettyMockRecorder) RemoveValue(key interface{}) *gomock.Call
RemoveValue indicates an expected call of RemoveValue
func (*MockConsulettyMockRecorder) RemoveValues ¶
func (mr *MockConsulettyMockRecorder) RemoveValues(prefix interface{}) *gomock.Call
RemoveValues indicates an expected call of RemoveValues