scada

package
v1.16.108 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CAPCoreAPI = capability.NewAddr("core_api")

CAPCoreAPI is the capability used to securely expose the Consul HTTP API to HCP

Functions

func IsCapability

func IsCapability(a net.Addr) bool

IsCapability takes a net.Addr and returns true if it is a SCADA capability.Addr

Types

type MockProvider

type MockProvider struct {
	mock.Mock
}

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) AddMeta

func (_m *MockProvider) AddMeta(_a0 ...provider.Meta)

AddMeta provides a mock function with given fields: _a0

func (*MockProvider) DeleteMeta

func (_m *MockProvider) DeleteMeta(_a0 ...string)

DeleteMeta provides a mock function with given fields: _a0

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_AddMeta_Call

type MockProvider_AddMeta_Call struct {
	*mock.Call
}

MockProvider_AddMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMeta'

func (*MockProvider_AddMeta_Call) Return

func (*MockProvider_AddMeta_Call) Run

func (*MockProvider_AddMeta_Call) RunAndReturn

func (_c *MockProvider_AddMeta_Call) RunAndReturn(run func(...provider.Meta)) *MockProvider_AddMeta_Call

type MockProvider_DeleteMeta_Call

type MockProvider_DeleteMeta_Call struct {
	*mock.Call
}

MockProvider_DeleteMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMeta'

func (*MockProvider_DeleteMeta_Call) Return

func (*MockProvider_DeleteMeta_Call) Run

func (*MockProvider_DeleteMeta_Call) RunAndReturn

func (_c *MockProvider_DeleteMeta_Call) RunAndReturn(run func(...string)) *MockProvider_DeleteMeta_Call

type MockProvider_Expecter

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

func (*MockProvider_Expecter) AddMeta

func (_e *MockProvider_Expecter) AddMeta(_a0 ...interface{}) *MockProvider_AddMeta_Call

AddMeta is a helper method to define mock.On call

  • _a0 ...provider.Meta

func (*MockProvider_Expecter) DeleteMeta

func (_e *MockProvider_Expecter) DeleteMeta(_a0 ...interface{}) *MockProvider_DeleteMeta_Call

DeleteMeta is a helper method to define mock.On call

  • _a0 ...string

func (*MockProvider_Expecter) GetMeta

GetMeta is a helper method to define mock.On call

func (*MockProvider_Expecter) LastError

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

SessionStatus is a helper method to define mock.On call

func (*MockProvider_Expecter) Start

Start is a helper method to define mock.On call

func (*MockProvider_Expecter) Stop

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

type MockProvider_GetMeta_Call struct {
	*mock.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 (*MockProvider_GetMeta_Call) Run

func (*MockProvider_GetMeta_Call) RunAndReturn

func (_c *MockProvider_GetMeta_Call) RunAndReturn(run func() map[string]string) *MockProvider_GetMeta_Call

type MockProvider_LastError_Call

type MockProvider_LastError_Call struct {
	*mock.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 (*MockProvider_LastError_Call) Run

func (*MockProvider_LastError_Call) RunAndReturn

func (_c *MockProvider_LastError_Call) RunAndReturn(run func() (time.Time, error)) *MockProvider_LastError_Call

type MockProvider_Listen_Call

type MockProvider_Listen_Call struct {
	*mock.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 (*MockProvider_Listen_Call) Run

func (_c *MockProvider_Listen_Call) Run(run func(capability string)) *MockProvider_Listen_Call

func (*MockProvider_Listen_Call) RunAndReturn

type MockProvider_SessionStatus_Call

type MockProvider_SessionStatus_Call struct {
	*mock.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 (*MockProvider_SessionStatus_Call) Run

func (*MockProvider_SessionStatus_Call) RunAndReturn

type MockProvider_Start_Call

type MockProvider_Start_Call struct {
	*mock.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 (*MockProvider_Start_Call) Run

func (_c *MockProvider_Start_Call) Run(run func()) *MockProvider_Start_Call

func (*MockProvider_Start_Call) RunAndReturn

func (_c *MockProvider_Start_Call) RunAndReturn(run func() error) *MockProvider_Start_Call

type MockProvider_Stop_Call

type MockProvider_Stop_Call struct {
	*mock.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 (*MockProvider_Stop_Call) Run

func (_c *MockProvider_Stop_Call) Run(run func()) *MockProvider_Stop_Call

func (*MockProvider_Stop_Call) RunAndReturn

func (_c *MockProvider_Stop_Call) RunAndReturn(run func() error) *MockProvider_Stop_Call

type MockProvider_UpdateMeta_Call

type MockProvider_UpdateMeta_Call struct {
	*mock.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 (*MockProvider_UpdateMeta_Call) Run

func (*MockProvider_UpdateMeta_Call) RunAndReturn

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.

func New

func New(cfg config.CloudConfig, logger hclog.Logger) (Provider, error)

Jump to

Keyboard shortcuts

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