model

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Overview

Package model is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChoriaProvider

type ChoriaProvider interface {
	PublishRaw(string, []byte) error
	Logger(string) *logrus.Entry
	Identity() string
	PrometheusTextFileDir() string
	ScoutOverridesPath() string
	ServerStatusFile() (string, int)
	MainCollective() string
	Connector() inter.Connector
	Facts() json.RawMessage
}

ChoriaProvider provides access to the choria framework

type Machine

type Machine interface {
	State() string
	Transition(t string, args ...interface{}) error
	NotifyWatcherState(string, interface{})
	Name() string
	Directory() string
	TextFileDirectory() string
	Identity() string
	InstanceID() string
	Version() string
	TimeStampSeconds() int64
	OverrideData() ([]byte, error)
	ChoriaStatusFile() (string, int)
	JetStreamConnection() (*jsm.Manager, error)
	PublishLifecycleEvent(t lifecycle.Type, opts ...lifecycle.Option)
	MainCollective() string
	Facts() json.RawMessage
	Data() map[string]interface{}
	DataPut(key string, val interface{}) error
	DataGet(key string) (interface{}, bool)
	DataDelete(key string) error
	Debugf(name string, format string, args ...interface{})
	Infof(name string, format string, args ...interface{})
	Warnf(name string, format string, args ...interface{})
	Errorf(name string, format string, args ...interface{})
}

type MachineConstructor added in v0.24.0

type MachineConstructor interface {
	Name() string
	Machine() interface{}
	PluginName() string
}

type MockChoriaProvider

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

MockChoriaProvider is a mock of ChoriaProvider interface.

func NewMockChoriaProvider

func NewMockChoriaProvider(ctrl *gomock.Controller) *MockChoriaProvider

NewMockChoriaProvider creates a new mock instance.

func (*MockChoriaProvider) Connector

func (m *MockChoriaProvider) Connector() inter.Connector

Connector mocks base method.

func (*MockChoriaProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockChoriaProvider) Facts

func (m *MockChoriaProvider) Facts() json.RawMessage

Facts mocks base method.

func (*MockChoriaProvider) Identity

func (m *MockChoriaProvider) Identity() string

Identity mocks base method.

func (*MockChoriaProvider) Logger

func (m *MockChoriaProvider) Logger(arg0 string) *logrus.Entry

Logger mocks base method.

func (*MockChoriaProvider) MainCollective

func (m *MockChoriaProvider) MainCollective() string

MainCollective mocks base method.

func (*MockChoriaProvider) PrometheusTextFileDir

func (m *MockChoriaProvider) PrometheusTextFileDir() string

PrometheusTextFileDir mocks base method.

func (*MockChoriaProvider) PublishRaw

func (m *MockChoriaProvider) PublishRaw(arg0 string, arg1 []byte) error

PublishRaw mocks base method.

func (*MockChoriaProvider) ScoutOverridesPath

func (m *MockChoriaProvider) ScoutOverridesPath() string

ScoutOverridesPath mocks base method.

func (*MockChoriaProvider) ServerStatusFile

func (m *MockChoriaProvider) ServerStatusFile() (string, int)

ServerStatusFile mocks base method.

type MockChoriaProviderMockRecorder

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

MockChoriaProviderMockRecorder is the mock recorder for MockChoriaProvider.

func (*MockChoriaProviderMockRecorder) Connector

func (mr *MockChoriaProviderMockRecorder) Connector() *gomock.Call

Connector indicates an expected call of Connector.

func (*MockChoriaProviderMockRecorder) Facts

Facts indicates an expected call of Facts.

func (*MockChoriaProviderMockRecorder) Identity

func (mr *MockChoriaProviderMockRecorder) Identity() *gomock.Call

Identity indicates an expected call of Identity.

func (*MockChoriaProviderMockRecorder) Logger

func (mr *MockChoriaProviderMockRecorder) Logger(arg0 interface{}) *gomock.Call

Logger indicates an expected call of Logger.

func (*MockChoriaProviderMockRecorder) MainCollective

func (mr *MockChoriaProviderMockRecorder) MainCollective() *gomock.Call

MainCollective indicates an expected call of MainCollective.

func (*MockChoriaProviderMockRecorder) PrometheusTextFileDir

func (mr *MockChoriaProviderMockRecorder) PrometheusTextFileDir() *gomock.Call

PrometheusTextFileDir indicates an expected call of PrometheusTextFileDir.

func (*MockChoriaProviderMockRecorder) PublishRaw

func (mr *MockChoriaProviderMockRecorder) PublishRaw(arg0, arg1 interface{}) *gomock.Call

PublishRaw indicates an expected call of PublishRaw.

func (*MockChoriaProviderMockRecorder) ScoutOverridesPath

func (mr *MockChoriaProviderMockRecorder) ScoutOverridesPath() *gomock.Call

ScoutOverridesPath indicates an expected call of ScoutOverridesPath.

func (*MockChoriaProviderMockRecorder) ServerStatusFile

func (mr *MockChoriaProviderMockRecorder) ServerStatusFile() *gomock.Call

ServerStatusFile indicates an expected call of ServerStatusFile.

type MockMachine

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

MockMachine is a mock of Machine interface.

func NewMockMachine

func NewMockMachine(ctrl *gomock.Controller) *MockMachine

NewMockMachine creates a new mock instance.

func (*MockMachine) ChoriaStatusFile

func (m *MockMachine) ChoriaStatusFile() (string, int)

ChoriaStatusFile mocks base method.

func (*MockMachine) Data

func (m *MockMachine) Data() map[string]interface{}

Data mocks base method.

func (*MockMachine) DataDelete

func (m *MockMachine) DataDelete(arg0 string) error

DataDelete mocks base method.

func (*MockMachine) DataGet

func (m *MockMachine) DataGet(arg0 string) (interface{}, bool)

DataGet mocks base method.

func (*MockMachine) DataPut

func (m *MockMachine) DataPut(arg0 string, arg1 interface{}) error

DataPut mocks base method.

func (*MockMachine) Debugf

func (m *MockMachine) Debugf(arg0, arg1 string, arg2 ...interface{})

Debugf mocks base method.

func (*MockMachine) Directory

func (m *MockMachine) Directory() string

Directory mocks base method.

func (*MockMachine) EXPECT

func (m *MockMachine) EXPECT() *MockMachineMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMachine) Errorf

func (m *MockMachine) Errorf(arg0, arg1 string, arg2 ...interface{})

Errorf mocks base method.

func (*MockMachine) Facts

func (m *MockMachine) Facts() json.RawMessage

Facts mocks base method.

func (*MockMachine) Identity

func (m *MockMachine) Identity() string

Identity mocks base method.

func (*MockMachine) Infof

func (m *MockMachine) Infof(arg0, arg1 string, arg2 ...interface{})

Infof mocks base method.

func (*MockMachine) InstanceID

func (m *MockMachine) InstanceID() string

InstanceID mocks base method.

func (*MockMachine) JetStreamConnection

func (m *MockMachine) JetStreamConnection() (*jsm_go.Manager, error)

JetStreamConnection mocks base method.

func (*MockMachine) MainCollective

func (m *MockMachine) MainCollective() string

MainCollective mocks base method.

func (*MockMachine) Name

func (m *MockMachine) Name() string

Name mocks base method.

func (*MockMachine) NotifyWatcherState

func (m *MockMachine) NotifyWatcherState(arg0 string, arg1 interface{})

NotifyWatcherState mocks base method.

func (*MockMachine) OverrideData

func (m *MockMachine) OverrideData() ([]byte, error)

OverrideData mocks base method.

func (*MockMachine) PublishLifecycleEvent

func (m *MockMachine) PublishLifecycleEvent(arg0 lifecycle.Type, arg1 ...lifecycle.Option)

PublishLifecycleEvent mocks base method.

func (*MockMachine) State

func (m *MockMachine) State() string

State mocks base method.

func (*MockMachine) TextFileDirectory

func (m *MockMachine) TextFileDirectory() string

TextFileDirectory mocks base method.

func (*MockMachine) TimeStampSeconds

func (m *MockMachine) TimeStampSeconds() int64

TimeStampSeconds mocks base method.

func (*MockMachine) Transition

func (m *MockMachine) Transition(arg0 string, arg1 ...interface{}) error

Transition mocks base method.

func (*MockMachine) Version

func (m *MockMachine) Version() string

Version mocks base method.

func (*MockMachine) Warnf

func (m *MockMachine) Warnf(arg0, arg1 string, arg2 ...interface{})

Warnf mocks base method.

type MockMachineMockRecorder

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

MockMachineMockRecorder is the mock recorder for MockMachine.

func (*MockMachineMockRecorder) ChoriaStatusFile

func (mr *MockMachineMockRecorder) ChoriaStatusFile() *gomock.Call

ChoriaStatusFile indicates an expected call of ChoriaStatusFile.

func (*MockMachineMockRecorder) Data

func (mr *MockMachineMockRecorder) Data() *gomock.Call

Data indicates an expected call of Data.

func (*MockMachineMockRecorder) DataDelete

func (mr *MockMachineMockRecorder) DataDelete(arg0 interface{}) *gomock.Call

DataDelete indicates an expected call of DataDelete.

func (*MockMachineMockRecorder) DataGet

func (mr *MockMachineMockRecorder) DataGet(arg0 interface{}) *gomock.Call

DataGet indicates an expected call of DataGet.

func (*MockMachineMockRecorder) DataPut

func (mr *MockMachineMockRecorder) DataPut(arg0, arg1 interface{}) *gomock.Call

DataPut indicates an expected call of DataPut.

func (*MockMachineMockRecorder) Debugf

func (mr *MockMachineMockRecorder) Debugf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Debugf indicates an expected call of Debugf.

func (*MockMachineMockRecorder) Directory

func (mr *MockMachineMockRecorder) Directory() *gomock.Call

Directory indicates an expected call of Directory.

func (*MockMachineMockRecorder) Errorf

func (mr *MockMachineMockRecorder) Errorf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Errorf indicates an expected call of Errorf.

func (*MockMachineMockRecorder) Facts

func (mr *MockMachineMockRecorder) Facts() *gomock.Call

Facts indicates an expected call of Facts.

func (*MockMachineMockRecorder) Identity

func (mr *MockMachineMockRecorder) Identity() *gomock.Call

Identity indicates an expected call of Identity.

func (*MockMachineMockRecorder) Infof

func (mr *MockMachineMockRecorder) Infof(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Infof indicates an expected call of Infof.

func (*MockMachineMockRecorder) InstanceID

func (mr *MockMachineMockRecorder) InstanceID() *gomock.Call

InstanceID indicates an expected call of InstanceID.

func (*MockMachineMockRecorder) JetStreamConnection

func (mr *MockMachineMockRecorder) JetStreamConnection() *gomock.Call

JetStreamConnection indicates an expected call of JetStreamConnection.

func (*MockMachineMockRecorder) MainCollective

func (mr *MockMachineMockRecorder) MainCollective() *gomock.Call

MainCollective indicates an expected call of MainCollective.

func (*MockMachineMockRecorder) Name

func (mr *MockMachineMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockMachineMockRecorder) NotifyWatcherState

func (mr *MockMachineMockRecorder) NotifyWatcherState(arg0, arg1 interface{}) *gomock.Call

NotifyWatcherState indicates an expected call of NotifyWatcherState.

func (*MockMachineMockRecorder) OverrideData

func (mr *MockMachineMockRecorder) OverrideData() *gomock.Call

OverrideData indicates an expected call of OverrideData.

func (*MockMachineMockRecorder) PublishLifecycleEvent

func (mr *MockMachineMockRecorder) PublishLifecycleEvent(arg0 interface{}, arg1 ...interface{}) *gomock.Call

PublishLifecycleEvent indicates an expected call of PublishLifecycleEvent.

func (*MockMachineMockRecorder) State

func (mr *MockMachineMockRecorder) State() *gomock.Call

State indicates an expected call of State.

func (*MockMachineMockRecorder) TextFileDirectory

func (mr *MockMachineMockRecorder) TextFileDirectory() *gomock.Call

TextFileDirectory indicates an expected call of TextFileDirectory.

func (*MockMachineMockRecorder) TimeStampSeconds

func (mr *MockMachineMockRecorder) TimeStampSeconds() *gomock.Call

TimeStampSeconds indicates an expected call of TimeStampSeconds.

func (*MockMachineMockRecorder) Transition

func (mr *MockMachineMockRecorder) Transition(arg0 interface{}, arg1 ...interface{}) *gomock.Call

Transition indicates an expected call of Transition.

func (*MockMachineMockRecorder) Version

func (mr *MockMachineMockRecorder) Version() *gomock.Call

Version indicates an expected call of Version.

func (*MockMachineMockRecorder) Warnf

func (mr *MockMachineMockRecorder) Warnf(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Warnf indicates an expected call of Warnf.

type MockWatcher

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

MockWatcher is a mock of Watcher interface.

func NewMockWatcher

func NewMockWatcher(ctrl *gomock.Controller) *MockWatcher

NewMockWatcher creates a new mock instance.

func (*MockWatcher) AnnounceInterval

func (m *MockWatcher) AnnounceInterval() time.Duration

AnnounceInterval mocks base method.

func (*MockWatcher) CurrentState

func (m *MockWatcher) CurrentState() interface{}

CurrentState mocks base method.

func (*MockWatcher) Delete

func (m *MockWatcher) Delete()

Delete mocks base method.

func (*MockWatcher) EXPECT

func (m *MockWatcher) EXPECT() *MockWatcherMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWatcher) Name

func (m *MockWatcher) Name() string

Name mocks base method.

func (*MockWatcher) NotifyStateChance

func (m *MockWatcher) NotifyStateChance()

NotifyStateChance mocks base method.

func (*MockWatcher) Run

func (m *MockWatcher) Run(arg0 context.Context, arg1 *sync.WaitGroup)

Run mocks base method.

func (*MockWatcher) Type

func (m *MockWatcher) Type() string

Type mocks base method.

type MockWatcherConstructor

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

MockWatcherConstructor is a mock of WatcherConstructor interface.

func NewMockWatcherConstructor

func NewMockWatcherConstructor(ctrl *gomock.Controller) *MockWatcherConstructor

NewMockWatcherConstructor creates a new mock instance.

func (*MockWatcherConstructor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWatcherConstructor) EventType

func (m *MockWatcherConstructor) EventType() string

EventType mocks base method.

func (*MockWatcherConstructor) New

func (m *MockWatcherConstructor) New(arg0 Machine, arg1 string, arg2 []string, arg3, arg4, arg5 string, arg6 time.Duration, arg7 map[string]interface{}) (interface{}, error)

New mocks base method.

func (*MockWatcherConstructor) Type

func (m *MockWatcherConstructor) Type() string

Type mocks base method.

func (*MockWatcherConstructor) UnmarshalNotification

func (m *MockWatcherConstructor) UnmarshalNotification(arg0 []byte) (interface{}, error)

UnmarshalNotification mocks base method.

type MockWatcherConstructorMockRecorder

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

MockWatcherConstructorMockRecorder is the mock recorder for MockWatcherConstructor.

func (*MockWatcherConstructorMockRecorder) EventType

EventType indicates an expected call of EventType.

func (*MockWatcherConstructorMockRecorder) New

func (mr *MockWatcherConstructorMockRecorder) New(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call

New indicates an expected call of New.

func (*MockWatcherConstructorMockRecorder) Type

Type indicates an expected call of Type.

func (*MockWatcherConstructorMockRecorder) UnmarshalNotification

func (mr *MockWatcherConstructorMockRecorder) UnmarshalNotification(arg0 interface{}) *gomock.Call

UnmarshalNotification indicates an expected call of UnmarshalNotification.

type MockWatcherMockRecorder

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

MockWatcherMockRecorder is the mock recorder for MockWatcher.

func (*MockWatcherMockRecorder) AnnounceInterval

func (mr *MockWatcherMockRecorder) AnnounceInterval() *gomock.Call

AnnounceInterval indicates an expected call of AnnounceInterval.

func (*MockWatcherMockRecorder) CurrentState

func (mr *MockWatcherMockRecorder) CurrentState() *gomock.Call

CurrentState indicates an expected call of CurrentState.

func (*MockWatcherMockRecorder) Delete

func (mr *MockWatcherMockRecorder) Delete() *gomock.Call

Delete indicates an expected call of Delete.

func (*MockWatcherMockRecorder) Name

func (mr *MockWatcherMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockWatcherMockRecorder) NotifyStateChance

func (mr *MockWatcherMockRecorder) NotifyStateChance() *gomock.Call

NotifyStateChance indicates an expected call of NotifyStateChance.

func (*MockWatcherMockRecorder) Run

func (mr *MockWatcherMockRecorder) Run(arg0, arg1 interface{}) *gomock.Call

Run indicates an expected call of Run.

func (*MockWatcherMockRecorder) Type

func (mr *MockWatcherMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type.

type Watcher

type Watcher interface {
	Name() string
	Type() string
	Run(context.Context, *sync.WaitGroup)
	NotifyStateChance()
	CurrentState() interface{}
	AnnounceInterval() time.Duration
	Delete()
}

Watcher is anything that can be used to watch the system for events

type WatcherConstructor

type WatcherConstructor interface {
	New(machine Machine, name string, states []string, failEvent string, successEvent string, interval string, ai time.Duration, properties map[string]interface{}) (interface{}, error)
	Type() string
	EventType() string
	UnmarshalNotification(n []byte) (interface{}, error)
}

WatcherConstructor creates a new watcher plugin

Jump to

Keyboard shortcuts

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