Documentation ¶
Index ¶
- type MockServiceLabel
- func (msl *MockServiceLabel) GetAgentLabel() string
- func (msl *MockServiceLabel) GetAgentPrefix() string
- func (msl *MockServiceLabel) GetAllAgentsPrefix() string
- func (msl *MockServiceLabel) GetDifferentAgentPrefix(microserviceLabel string) string
- func (msl *MockServiceLabel) SetAgentLabel(label string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockServiceLabel ¶
type MockServiceLabel struct {
// contains filtered or unexported fields
}
MockServiceLabel is a mock for ServiceLabel plugin.
func NewMockServiceLabel ¶
func NewMockServiceLabel() *MockServiceLabel
NewServiceLabel is a constructor for ServiceLabel.
func (*MockServiceLabel) GetAgentLabel ¶
func (msl *MockServiceLabel) GetAgentLabel() string
GetAgentLabel return the microservice label associated with this Agent instance.
func (*MockServiceLabel) GetAgentPrefix ¶
func (msl *MockServiceLabel) GetAgentPrefix() string
GetAgentPrefix returns the string that is supposed to be used as the key prefix for the configuration "subtree" of the current Agent instance (e.g. in ETCD).
func (*MockServiceLabel) GetAllAgentsPrefix ¶
func (msl *MockServiceLabel) GetAllAgentsPrefix() string
GetAllAgentsPrefix returns the part of the key prefix common to all prefixes of all agents.
func (*MockServiceLabel) GetDifferentAgentPrefix ¶
func (msl *MockServiceLabel) GetDifferentAgentPrefix(microserviceLabel string) string
GetDifferentAgentPrefix returns the key prefix used by (another) Agent instance from microservice labelled as <microserviceLabel>.
func (*MockServiceLabel) SetAgentLabel ¶
func (msl *MockServiceLabel) SetAgentLabel(label string)
SetAgentLabel allows to set what tests will assume the agent label is.