Documentation ¶
Index ¶
- Variables
- func IsCapability(a net.Addr) bool
- type MockProvider
- func (_m *MockProvider) EXPECT() *MockProvider_Expecter
- func (_m *MockProvider) GetMeta() map[string]string
- func (_m *MockProvider) LastError() (time.Time, error)
- func (_m *MockProvider) Listen(capability string) (net.Listener, error)
- func (_m *MockProvider) SessionStatus() string
- func (_m *MockProvider) Start() error
- func (_m *MockProvider) Stop() error
- func (_m *MockProvider) UpdateMeta(_a0 map[string]string)
- type MockProvider_Expecter
- func (_e *MockProvider_Expecter) GetMeta() *MockProvider_GetMeta_Call
- func (_e *MockProvider_Expecter) LastError() *MockProvider_LastError_Call
- func (_e *MockProvider_Expecter) Listen(capability interface{}) *MockProvider_Listen_Call
- func (_e *MockProvider_Expecter) SessionStatus() *MockProvider_SessionStatus_Call
- func (_e *MockProvider_Expecter) Start() *MockProvider_Start_Call
- func (_e *MockProvider_Expecter) Stop() *MockProvider_Stop_Call
- func (_e *MockProvider_Expecter) UpdateMeta(_a0 interface{}) *MockProvider_UpdateMeta_Call
- type MockProvider_GetMeta_Call
- type MockProvider_LastError_Call
- type MockProvider_Listen_Call
- type MockProvider_SessionStatus_Call
- type MockProvider_Start_Call
- type MockProvider_Stop_Call
- type MockProvider_UpdateMeta_Call
- type Provider
Constants ¶
This section is empty.
Variables ¶
var CAPCoreAPI = capability.NewAddr("core_api")
CAPCoreAPI is the capability used to securely expose the Consul HTTP API to HCP
Functions ¶
func IsCapability ¶
IsCapability takes a net.Addr and returns true if it is a SCADA capability.Addr
Types ¶
type MockProvider ¶
MockProvider is an autogenerated mock type for the Provider type
func NewMockProvider ¶
func NewMockProvider(t mockConstructorTestingTNewMockProvider) *MockProvider
NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockProvider) EXPECT ¶
func (_m *MockProvider) EXPECT() *MockProvider_Expecter
func (*MockProvider) GetMeta ¶
func (_m *MockProvider) GetMeta() map[string]string
GetMeta provides a mock function with given fields:
func (*MockProvider) LastError ¶
func (_m *MockProvider) LastError() (time.Time, error)
LastError provides a mock function with given fields:
func (*MockProvider) Listen ¶
func (_m *MockProvider) Listen(capability string) (net.Listener, error)
Listen provides a mock function with given fields: capability
func (*MockProvider) SessionStatus ¶
func (_m *MockProvider) SessionStatus() string
SessionStatus provides a mock function with given fields:
func (*MockProvider) Start ¶
func (_m *MockProvider) Start() error
Start provides a mock function with given fields:
func (*MockProvider) Stop ¶
func (_m *MockProvider) Stop() error
Stop provides a mock function with given fields:
func (*MockProvider) UpdateMeta ¶
func (_m *MockProvider) UpdateMeta(_a0 map[string]string)
UpdateMeta provides a mock function with given fields: _a0
type MockProvider_Expecter ¶
type MockProvider_Expecter struct {
// contains filtered or unexported fields
}
func (*MockProvider_Expecter) GetMeta ¶
func (_e *MockProvider_Expecter) GetMeta() *MockProvider_GetMeta_Call
GetMeta is a helper method to define mock.On call
func (*MockProvider_Expecter) LastError ¶
func (_e *MockProvider_Expecter) LastError() *MockProvider_LastError_Call
LastError is a helper method to define mock.On call
func (*MockProvider_Expecter) Listen ¶
func (_e *MockProvider_Expecter) Listen(capability interface{}) *MockProvider_Listen_Call
Listen is a helper method to define mock.On call
- capability string
func (*MockProvider_Expecter) SessionStatus ¶
func (_e *MockProvider_Expecter) SessionStatus() *MockProvider_SessionStatus_Call
SessionStatus is a helper method to define mock.On call
func (*MockProvider_Expecter) Start ¶
func (_e *MockProvider_Expecter) Start() *MockProvider_Start_Call
Start is a helper method to define mock.On call
func (*MockProvider_Expecter) Stop ¶
func (_e *MockProvider_Expecter) Stop() *MockProvider_Stop_Call
Stop is a helper method to define mock.On call
func (*MockProvider_Expecter) UpdateMeta ¶
func (_e *MockProvider_Expecter) UpdateMeta(_a0 interface{}) *MockProvider_UpdateMeta_Call
UpdateMeta is a helper method to define mock.On call
- _a0 map[string]string
type MockProvider_GetMeta_Call ¶
MockProvider_GetMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMeta'
func (*MockProvider_GetMeta_Call) Return ¶
func (_c *MockProvider_GetMeta_Call) Return(_a0 map[string]string) *MockProvider_GetMeta_Call
func (*MockProvider_GetMeta_Call) Run ¶
func (_c *MockProvider_GetMeta_Call) Run(run func()) *MockProvider_GetMeta_Call
type MockProvider_LastError_Call ¶
MockProvider_LastError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastError'
func (*MockProvider_LastError_Call) Return ¶
func (_c *MockProvider_LastError_Call) Return(_a0 time.Time, _a1 error) *MockProvider_LastError_Call
func (*MockProvider_LastError_Call) Run ¶
func (_c *MockProvider_LastError_Call) Run(run func()) *MockProvider_LastError_Call
type MockProvider_Listen_Call ¶
MockProvider_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'
func (*MockProvider_Listen_Call) Return ¶
func (_c *MockProvider_Listen_Call) Return(_a0 net.Listener, _a1 error) *MockProvider_Listen_Call
func (*MockProvider_Listen_Call) Run ¶
func (_c *MockProvider_Listen_Call) Run(run func(capability string)) *MockProvider_Listen_Call
type MockProvider_SessionStatus_Call ¶
MockProvider_SessionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SessionStatus'
func (*MockProvider_SessionStatus_Call) Return ¶
func (_c *MockProvider_SessionStatus_Call) Return(_a0 string) *MockProvider_SessionStatus_Call
func (*MockProvider_SessionStatus_Call) Run ¶
func (_c *MockProvider_SessionStatus_Call) Run(run func()) *MockProvider_SessionStatus_Call
type MockProvider_Start_Call ¶
MockProvider_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockProvider_Start_Call) Return ¶
func (_c *MockProvider_Start_Call) Return(_a0 error) *MockProvider_Start_Call
func (*MockProvider_Start_Call) Run ¶
func (_c *MockProvider_Start_Call) Run(run func()) *MockProvider_Start_Call
type MockProvider_Stop_Call ¶
MockProvider_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
func (*MockProvider_Stop_Call) Return ¶
func (_c *MockProvider_Stop_Call) Return(_a0 error) *MockProvider_Stop_Call
func (*MockProvider_Stop_Call) Run ¶
func (_c *MockProvider_Stop_Call) Run(run func()) *MockProvider_Stop_Call
type MockProvider_UpdateMeta_Call ¶
MockProvider_UpdateMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateMeta'
func (*MockProvider_UpdateMeta_Call) Return ¶
func (_c *MockProvider_UpdateMeta_Call) Return() *MockProvider_UpdateMeta_Call
func (*MockProvider_UpdateMeta_Call) Run ¶
func (_c *MockProvider_UpdateMeta_Call) Run(run func(_a0 map[string]string)) *MockProvider_UpdateMeta_Call
type Provider ¶
type Provider interface { libscada.SCADAProvider }
Provider is the interface used in the rest of Consul core when using SCADA, it is aliased here to the same interface provided by the hcp-scada-provider library. If the interfaces needs to be extended in the future it can be done so with minimal impact on the rest of the codebase.