mock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package mock_corefile is a generated GoMock package.

Package mock is a generated GoMock package.

Package mock_custom is a generated GoMock package.

Package mock_diskfull is a generated GoMock package.

Package mock_custom is a generated GoMock package.

Package mock_metricbeat is a generated GoMock package.

Package mock_ping is a generated GoMock package.

Package mock_http is a generated GoMock package.

Package mock is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig() define.Config

NewConfig :

func NewTask

func NewTask() define.Task

NewTask :

Types

type Config

type Config struct {
	Task TaskMetaConfig `inject:"inline"`
}

Config :

func (*Config) Clean

func (c *Config) Clean() error

Clean :

func (*Config) GetGatherUpDataID

func (c *Config) GetGatherUpDataID() int32

func (*Config) GetTaskConfigListByType

func (c *Config) GetTaskConfigListByType(_ string) []define.TaskConfig

GetTaskConfigListByType :

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

func (m *MockClient) Do(arg0 *http.Request) (*http.Response, error)

Do mocks base method

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

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

type MockClientMockRecorder

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

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) Do

func (mr *MockClientMockRecorder) Do(arg0 interface{}) *gomock.Call

Do indicates an expected call of Do

type MockConn

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

MockConn is a mock of Conn interface

func NewMockConn

func NewMockConn(ctrl *gomock.Controller) *MockConn

NewMockConn creates a new mock instance

func (*MockConn) Close

func (m *MockConn) Close() error

Close mocks base method

func (*MockConn) EXPECT

func (m *MockConn) EXPECT() *MockConnMockRecorder

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

func (*MockConn) LocalAddr

func (m *MockConn) LocalAddr() net.Addr

LocalAddr mocks base method

func (*MockConn) Read

func (m *MockConn) Read(arg0 []byte) (int, error)

Read mocks base method

func (*MockConn) RemoteAddr

func (m *MockConn) RemoteAddr() net.Addr

RemoteAddr mocks base method

func (*MockConn) SetDeadline

func (m *MockConn) SetDeadline(arg0 time.Time) error

SetDeadline mocks base method

func (*MockConn) SetReadDeadline

func (m *MockConn) SetReadDeadline(arg0 time.Time) error

SetReadDeadline mocks base method

func (*MockConn) SetWriteDeadline

func (m *MockConn) SetWriteDeadline(arg0 time.Time) error

SetWriteDeadline mocks base method

func (*MockConn) Write

func (m *MockConn) Write(arg0 []byte) (int, error)

Write mocks base method

type MockConnMockRecorder

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

MockConnMockRecorder is the mock recorder for MockConn

func (*MockConnMockRecorder) Close

func (mr *MockConnMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockConnMockRecorder) LocalAddr

func (mr *MockConnMockRecorder) LocalAddr() *gomock.Call

LocalAddr indicates an expected call of LocalAddr

func (*MockConnMockRecorder) Read

func (mr *MockConnMockRecorder) Read(arg0 interface{}) *gomock.Call

Read indicates an expected call of Read

func (*MockConnMockRecorder) RemoteAddr

func (mr *MockConnMockRecorder) RemoteAddr() *gomock.Call

RemoteAddr indicates an expected call of RemoteAddr

func (*MockConnMockRecorder) SetDeadline

func (mr *MockConnMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call

SetDeadline indicates an expected call of SetDeadline

func (*MockConnMockRecorder) SetReadDeadline

func (mr *MockConnMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call

SetReadDeadline indicates an expected call of SetReadDeadline

func (*MockConnMockRecorder) SetWriteDeadline

func (mr *MockConnMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call

SetWriteDeadline indicates an expected call of SetWriteDeadline

func (*MockConnMockRecorder) Write

func (mr *MockConnMockRecorder) Write(arg0 interface{}) *gomock.Call

Write indicates an expected call of Write

type MockDiskTool

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

MockDiskTool is a mock of DiskTool interface

func NewMockDiskTool

func NewMockDiskTool(ctrl *gomock.Controller) *MockDiskTool

NewMockDiskTool creates a new mock instance

func (*MockDiskTool) EXPECT

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

func (*MockDiskTool) GetDiskInfo

func (m *MockDiskTool) GetDiskInfo() ([]map[string]interface{}, error)

GetDiskInfo mocks base method

func (*MockDiskTool) Init

func (m *MockDiskTool) Init(arg0 []string) error

Init mocks base method

type MockDiskToolMockRecorder

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

MockDiskToolMockRecorder is the mock recorder for MockDiskTool

func (*MockDiskToolMockRecorder) GetDiskInfo

func (mr *MockDiskToolMockRecorder) GetDiskInfo() *gomock.Call

GetDiskInfo indicates an expected call of GetDiskInfo

func (*MockDiskToolMockRecorder) Init

func (mr *MockDiskToolMockRecorder) Init(arg0 interface{}) *gomock.Call

Init indicates an expected call of Init

type MockListenTool

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

MockListenTool is a mock of ListenTool interface

func NewMockListenTool

func NewMockListenTool(ctrl *gomock.Controller) *MockListenTool

NewMockListenTool creates a new mock instance

func (*MockListenTool) EXPECT

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

func (*MockListenTool) Init

func (m *MockListenTool) Init(arg0 define.TaskConfig, arg1 chan<- define.Event) error

Init mocks base method

func (*MockListenTool) Start

func (m *MockListenTool) Start() error

Start mocks base method

func (*MockListenTool) Stop

func (m *MockListenTool) Stop(arg0 context.Context) error

Stop mocks base method

type MockListenToolMockRecorder

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

MockListenToolMockRecorder is the mock recorder for MockListenTool

func (*MockListenToolMockRecorder) Init

func (mr *MockListenToolMockRecorder) Init(arg0, arg1 interface{}) *gomock.Call

Init indicates an expected call of Init

func (*MockListenToolMockRecorder) Start

func (mr *MockListenToolMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start

func (*MockListenToolMockRecorder) Stop

func (mr *MockListenToolMockRecorder) Stop(arg0 interface{}) *gomock.Call

Stop indicates an expected call of Stop

type MockMetricTool

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

MockMetricTool is a mock of MetricTool interface

func NewMockMetricTool

func NewMockMetricTool(ctrl *gomock.Controller) *MockMetricTool

NewMockMetricTool creates a new mock instance

func (*MockMetricTool) EXPECT

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

func (*MockMetricTool) Init

Init mocks base method

func (*MockMetricTool) Run

func (m *MockMetricTool) Run(arg0 context.Context, arg1 chan<- define.Event) error

Run mocks base method

type MockMetricToolMockRecorder

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

MockMetricToolMockRecorder is the mock recorder for MockMetricTool

func (*MockMetricToolMockRecorder) Init

func (mr *MockMetricToolMockRecorder) Init(arg0 interface{}) *gomock.Call

Init indicates an expected call of Init

func (*MockMetricToolMockRecorder) Run

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

Run indicates an expected call of Run

type MockResponseWriter

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

MockResponseWriter is a mock of ResponseWriter interface

func NewMockResponseWriter

func NewMockResponseWriter(ctrl *gomock.Controller) *MockResponseWriter

NewMockResponseWriter creates a new mock instance

func (*MockResponseWriter) EXPECT

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

func (*MockResponseWriter) Header

func (m *MockResponseWriter) Header() http.Header

Header mocks base method

func (*MockResponseWriter) Write

func (m *MockResponseWriter) Write(arg0 []byte) (int, error)

Write mocks base method

func (*MockResponseWriter) WriteHeader

func (m *MockResponseWriter) WriteHeader(arg0 int)

WriteHeader mocks base method

type MockResponseWriterMockRecorder

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

MockResponseWriterMockRecorder is the mock recorder for MockResponseWriter

func (*MockResponseWriterMockRecorder) Header

Header indicates an expected call of Header

func (*MockResponseWriterMockRecorder) Write

func (mr *MockResponseWriterMockRecorder) Write(arg0 interface{}) *gomock.Call

Write indicates an expected call of Write

func (*MockResponseWriterMockRecorder) WriteHeader

func (mr *MockResponseWriterMockRecorder) WriteHeader(arg0 interface{}) *gomock.Call

WriteHeader indicates an expected call of WriteHeader

type MockServer

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

MockServer is a mock of Server interface

func NewMockServer

func NewMockServer(ctrl *gomock.Controller) *MockServer

NewMockServer creates a new mock instance

func (*MockServer) EXPECT

func (m *MockServer) EXPECT() *MockServerMockRecorder

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

func (*MockServer) ListenAndServe

func (m *MockServer) ListenAndServe() error

ListenAndServe mocks base method

func (*MockServer) Shutdown

func (m *MockServer) Shutdown(arg0 context.Context) error

Shutdown mocks base method

type MockServerMockRecorder

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

MockServerMockRecorder is the mock recorder for MockServer

func (*MockServerMockRecorder) ListenAndServe

func (mr *MockServerMockRecorder) ListenAndServe() *gomock.Call

ListenAndServe indicates an expected call of ListenAndServe

func (*MockServerMockRecorder) Shutdown

func (mr *MockServerMockRecorder) Shutdown(arg0 interface{}) *gomock.Call

Shutdown indicates an expected call of Shutdown

type MockTarget

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

MockTarget is a mock of Target interface

func NewMockTarget

func NewMockTarget(ctrl *gomock.Controller) *MockTarget

NewMockTarget creates a new mock instance

func (*MockTarget) EXPECT

func (m *MockTarget) EXPECT() *MockTargetMockRecorder

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

func (*MockTarget) GetTarget

func (m *MockTarget) GetTarget() string

GetTarget mocks base method

func (*MockTarget) GetTargetType

func (m *MockTarget) GetTargetType() string

GetTargetType mocks base method

type MockTargetMockRecorder

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

MockTargetMockRecorder is the mock recorder for MockTarget

func (*MockTargetMockRecorder) GetTarget

func (mr *MockTargetMockRecorder) GetTarget() *gomock.Call

GetTarget indicates an expected call of GetTarget

func (*MockTargetMockRecorder) GetTargetType

func (mr *MockTargetMockRecorder) GetTargetType() *gomock.Call

GetTargetType indicates an expected call of GetTargetType

type MockTool

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

MockTool is a mock of Tool interface

func NewMockTool

func NewMockTool(ctrl *gomock.Controller) *MockTool

NewMockTool creates a new mock instance

func (*MockTool) EXPECT

func (m *MockTool) EXPECT() *MockToolMockRecorder

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

func (*MockTool) Ping

func (m *MockTool) Ping(doFunc ping.DoFunc) error

Ping mocks base method

type MockToolMockRecorder

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

MockToolMockRecorder is the mock recorder for MockTool

func (*MockToolMockRecorder) Ping

func (mr *MockToolMockRecorder) Ping(doFunc interface{}) *gomock.Call

Ping indicates an expected call of Ping

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

func (m *MockWatcher) Add(arg0 string) error

Add mocks base method

func (*MockWatcher) Close

func (m *MockWatcher) Close() error

Close 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) ListenFileEvent

func (m *MockWatcher) ListenFileEvent(arg0 context.Context, arg1 chan<- fsnotify.Event) error

ListenFileEvent mocks base method

func (*MockWatcher) Remove

func (m *MockWatcher) Remove(arg0 string) error

Remove mocks base method

type MockWatcherMockRecorder

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

MockWatcherMockRecorder is the mock recorder for MockWatcher

func (*MockWatcherMockRecorder) Add

func (mr *MockWatcherMockRecorder) Add(arg0 interface{}) *gomock.Call

Add indicates an expected call of Add

func (*MockWatcherMockRecorder) Close

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

Close indicates an expected call of Close

func (*MockWatcherMockRecorder) ListenFileEvent

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

ListenFileEvent indicates an expected call of ListenFileEvent

func (*MockWatcherMockRecorder) Remove

func (mr *MockWatcherMockRecorder) Remove(arg0 interface{}) *gomock.Call

Remove indicates an expected call of Remove

type Task

type Task struct {
	GlobalConfig *Config     `inject:""`
	TaskConfig   *TaskConfig `inject:""`
}

Task :

func (*Task) GetConfig

func (t *Task) GetConfig() define.TaskConfig

GetConfig :

func (*Task) GetGlobalConfig

func (t *Task) GetGlobalConfig() define.Config

GetGlobalConfig :

func (*Task) GetStatus

func (t *Task) GetStatus() define.Status

GetStatus :

func (*Task) GetTaskID

func (t *Task) GetTaskID() int32

GetTaskID :

func (*Task) Reload

func (t *Task) Reload()

Reload :

func (*Task) Run

func (t *Task) Run(ctx context.Context, e chan<- define.Event)

Run :

func (*Task) SetConfig

func (t *Task) SetConfig(config define.TaskConfig)

SetConfig :

func (*Task) SetGlobalConfig

func (t *Task) SetGlobalConfig(config define.Config)

SetGlobalConfig :

func (*Task) Stop

func (t *Task) Stop()

func (*Task) Wait

func (t *Task) Wait()

Wait :

type TaskConfig

type TaskConfig struct {
	configs.NetTaskParam
	BizID             int32         `config:"bk_biz_id" validate:"required"`
	TaskID            int32         `config:"task_id" validate:"required"`
	AvailableDuration time.Duration `config:"available_duration"`
	Timeout           time.Duration `config:"timeout" validate:"min=1s"`
	Period            time.Duration `config:"period" validate:"min=1s"`
}

TaskConfig :

func (*TaskConfig) Clean

func (c *TaskConfig) Clean() error

Clean :

func (*TaskConfig) GetAvailableDuration

func (c *TaskConfig) GetAvailableDuration() time.Duration

GetAvailableDuration :

func (*TaskConfig) GetBizID

func (c *TaskConfig) GetBizID() int32

GetBizID :

func (*TaskConfig) GetPeriod

func (c *TaskConfig) GetPeriod() time.Duration

GetPeriod :

func (*TaskConfig) GetTaskID

func (c *TaskConfig) GetTaskID() int32

GetTaskID :

func (*TaskConfig) GetTimeout

func (c *TaskConfig) GetTimeout() time.Duration

GetTimeout :

func (*TaskConfig) GetType

func (c *TaskConfig) GetType() string

GetType :

func (*TaskConfig) InitIdent

func (c *TaskConfig) InitIdent() error

InitIdent :

type TaskMetaConfig

type TaskMetaConfig struct {
	Task *TaskConfig `inject:""`
}

TaskMetaConfig :

func (*TaskMetaConfig) Clean

func (c *TaskMetaConfig) Clean() error

Clean :

func (*TaskMetaConfig) GetTaskConfigList

func (c *TaskMetaConfig) GetTaskConfigList() []define.TaskConfig

GetTaskConfigList :

Jump to

Keyboard shortcuts

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