Documentation
¶
Overview ¶
Package placement is a generated GoMock package.
Index ¶
- type Client
- type MockClient
- func (m *MockClient) Add(instance placementpb.Instance) error
- func (m *MockClient) Delete() error
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) Get() (placement.Placement, error)
- func (m *MockClient) Init(request *admin.PlacementInitRequest) error
- func (m *MockClient) Remove(id string) error
- func (m *MockClient) Replace(leavingInstanceID string, newInstance placementpb.Instance) error
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) Add(instance interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Delete() *gomock.Call
- func (mr *MockClientMockRecorder) Get() *gomock.Call
- func (mr *MockClientMockRecorder) Init(request interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Remove(id interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) Replace(leavingInstanceID, newInstance interface{}) *gomock.Call
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Init will initialize a placement give a valid placement request
Init(request *admin.PlacementInitRequest) error
// Get will provide the current placement
Get() (placement m3placement.Placement, err error)
// Delete will delete the current placment
Delete() error
// Add will add an instance to the placement
Add(instance placementpb.Instance) error
// Remove removes a given instance with the given ID from the placement.
Remove(id string) error
// Replace replaces one instance with another.
Replace(leavingInstanceID string, newInstance placementpb.Instance) error
}
Client provides the interface to interact with the placement API
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance
func (*MockClient) Add ¶
func (m *MockClient) Add(instance placementpb.Instance) error
Add mocks base method
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClient) Get ¶
func (m *MockClient) Get() (placement.Placement, error)
Get mocks base method
func (*MockClient) Init ¶
func (m *MockClient) Init(request *admin.PlacementInitRequest) error
Init mocks base method
func (*MockClient) Replace ¶
func (m *MockClient) Replace(leavingInstanceID string, newInstance placementpb.Instance) error
Replace mocks base method
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) Add ¶
func (mr *MockClientMockRecorder) Add(instance interface{}) *gomock.Call
Add indicates an expected call of Add
func (*MockClientMockRecorder) Delete ¶
func (mr *MockClientMockRecorder) Delete() *gomock.Call
Delete indicates an expected call of Delete
func (*MockClientMockRecorder) Get ¶
func (mr *MockClientMockRecorder) Get() *gomock.Call
Get indicates an expected call of Get
func (*MockClientMockRecorder) Init ¶
func (mr *MockClientMockRecorder) Init(request interface{}) *gomock.Call
Init indicates an expected call of Init
func (*MockClientMockRecorder) Remove ¶
func (mr *MockClientMockRecorder) Remove(id interface{}) *gomock.Call
Remove indicates an expected call of Remove
func (*MockClientMockRecorder) Replace ¶
func (mr *MockClientMockRecorder) Replace(leavingInstanceID, newInstance interface{}) *gomock.Call
Replace indicates an expected call of Replace
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option provides an interface that can be used for setter options with the constructor
func WithClient ¶
WithClient configures an m3admin client.
func WithLogger ¶
WithLogger is a setter to override the default logger