Documentation ¶
Overview ¶
Package agent is a generated GoMock package.
Index ¶
- type ActionInfo
- type Actions
- type Agent
- type FossilizerInfo
- type Info
- type MockAgent
- func (m *MockAgent) AddProcess(process string, actions Actions, storeClient interface{}, ...) (Process, error)
- func (m *MockAgent) EXPECT() *MockAgentMockRecorder
- func (m *MockAgent) FindSegments(process string, opts map[string]string) (cs.SegmentSlice, error)
- func (m *MockAgent) GetInfo() (*Info, error)
- func (m *MockAgent) GetMapIds(process string, opts map[string]string) (cs.SegmentSlice, error)
- func (m *MockAgent) GetProcess(process string) (Process, error)
- func (m *MockAgent) GetProcesses() (Processes, error)
- func (m *MockAgent) HttpServer() *http.Server
- func (m *MockAgent) RemoveProcess(process string) (Processes, error)
- func (m *MockAgent) Url() string
- type MockAgentMockRecorder
- func (mr *MockAgentMockRecorder) AddProcess(process, actions, storeClient, fossilizerClients, opts interface{}) *gomock.Call
- func (mr *MockAgentMockRecorder) FindSegments(process, opts interface{}) *gomock.Call
- func (mr *MockAgentMockRecorder) GetInfo() *gomock.Call
- func (mr *MockAgentMockRecorder) GetMapIds(process, opts interface{}) *gomock.Call
- func (mr *MockAgentMockRecorder) GetProcess(process interface{}) *gomock.Call
- func (mr *MockAgentMockRecorder) GetProcesses() *gomock.Call
- func (mr *MockAgentMockRecorder) HttpServer() *gomock.Call
- func (mr *MockAgentMockRecorder) RemoveProcess(process interface{}) *gomock.Call
- func (mr *MockAgentMockRecorder) Url() *gomock.Call
- type Plugin
- type PluginInfo
- type Plugins
- type Process
- type ProcessInfo
- type ProcessOptions
- type Processes
- type ProcessesMap
- type StoreInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionInfo ¶
ActionInfo is the data structure used by Process.GetInfo()
type Actions ¶
type Actions map[string]func(...interface{}) interface{}
Actions is a map indexing an action function by its name
type Agent ¶
type Agent interface { AddProcess(process string, actions Actions, storeClient interface{}, fossilizerClients []interface{}, opts *ProcessOptions) (Process, error) FindSegments(filter store.SegmentFilter) (cs.SegmentSlice, error) GetInfo() (*Info, error) GetMapIds(filter store.MapFilter) ([]string, error) GetProcesses() (Processes, error) GetProcess(process string) (*Process, error) GetSegment(process string, linkHash types.Bytes32) HttpServer() *http.Server RemoveProcess(process string) (Processes, error) Url() string }
Agent is the interface of an agent
type FossilizerInfo ¶
type FossilizerInfo map[string]interface{}
FossilizerInfo is the generic data structure returned by Fossilizer.GetInfo()
type Info ¶
type Info struct { Processes ProcessesMap `json:"processes"` Stores []StoreInfo `json:"stores"` Fossilizers []FossilizerInfo `json:"fossilizers"` Plugins Plugins `json:"plugins"` }
Info is the data structure returned by Agent.GetInfo()
type MockAgent ¶
type MockAgent struct {
// contains filtered or unexported fields
}
MockAgent is a mock of Agent interface
func NewMockAgent ¶
func NewMockAgent(ctrl *gomock.Controller) *MockAgent
NewMockAgent creates a new mock instance
func (*MockAgent) AddProcess ¶
func (m *MockAgent) AddProcess(process string, actions Actions, storeClient interface{}, fossilizerClients []interface{}, opts *ProcessOptions) (Process, error)
AddProcess mocks base method
func (*MockAgent) EXPECT ¶
func (m *MockAgent) EXPECT() *MockAgentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAgent) FindSegments ¶
FindSegments mocks base method
func (*MockAgent) GetProcess ¶
GetProcess mocks base method
func (*MockAgent) GetProcesses ¶
GetProcesses mocks base method
func (*MockAgent) HttpServer ¶
HttpServer mocks base method
func (*MockAgent) RemoveProcess ¶
RemoveProcess mocks base method
type MockAgentMockRecorder ¶
type MockAgentMockRecorder struct {
// contains filtered or unexported fields
}
MockAgentMockRecorder is the mock recorder for MockAgent
func (*MockAgentMockRecorder) AddProcess ¶
func (mr *MockAgentMockRecorder) AddProcess(process, actions, storeClient, fossilizerClients, opts interface{}) *gomock.Call
AddProcess indicates an expected call of AddProcess
func (*MockAgentMockRecorder) FindSegments ¶
func (mr *MockAgentMockRecorder) FindSegments(process, opts interface{}) *gomock.Call
FindSegments indicates an expected call of FindSegments
func (*MockAgentMockRecorder) GetInfo ¶
func (mr *MockAgentMockRecorder) GetInfo() *gomock.Call
GetInfo indicates an expected call of GetInfo
func (*MockAgentMockRecorder) GetMapIds ¶
func (mr *MockAgentMockRecorder) GetMapIds(process, opts interface{}) *gomock.Call
GetMapIds indicates an expected call of GetMapIds
func (*MockAgentMockRecorder) GetProcess ¶
func (mr *MockAgentMockRecorder) GetProcess(process interface{}) *gomock.Call
GetProcess indicates an expected call of GetProcess
func (*MockAgentMockRecorder) GetProcesses ¶
func (mr *MockAgentMockRecorder) GetProcesses() *gomock.Call
GetProcesses indicates an expected call of GetProcesses
func (*MockAgentMockRecorder) HttpServer ¶
func (mr *MockAgentMockRecorder) HttpServer() *gomock.Call
HttpServer indicates an expected call of HttpServer
func (*MockAgentMockRecorder) RemoveProcess ¶
func (mr *MockAgentMockRecorder) RemoveProcess(process interface{}) *gomock.Call
RemoveProcess indicates an expected call of RemoveProcess
func (*MockAgentMockRecorder) Url ¶
func (mr *MockAgentMockRecorder) Url() *gomock.Call
Url indicates an expected call of Url
type Plugin ¶
type Plugin interface { // WillCreate is called right before a transition function from the agent's actions. // It takes the existing link as an argument. It should be updated in-place. WillCreate(*cs.Link) //is called whenever a link has been created by a transition function. // It takes the new link as an argument. It should be updated in-place. DidCreateLink(*cs.Link) // is called when segments are retrieved by the agent from the underlying storage. // It should return true if the plugins accepts the segment, false otherwise. FilterSegment(*cs.Segment) bool }
Plugin is the interface describing the handlers that a plugin can implement
type PluginInfo ¶
type PluginInfo struct { Name string `json:"name"` Description string `json:"description"` ID string `json:"id"` }
PluginInfo is the data structure used by the agent when returning informations about a process' plugins
type Process ¶
type Process struct { Name string `json:"name"` ProcessInfo ProcessInfo `json:"processInfo"` StoreInfo StoreInfo `json:"storeInfo"` FossilizersInfo []FossilizerInfo `json:"fossilizersInfo"` }
Process is the agent's representation of a process
type ProcessInfo ¶
type ProcessInfo struct { Actions map[string]ActionInfo `json:"actions"` PluginsInfo []PluginInfo `json:"pluginsInfo"` }
ProcessInfo is the data structure used to store information about a process actions and plugins
type ProcessOptions ¶
type ProcessOptions struct { ReconnectTimeout int `json:"reconnectTimeout"` Plugins Plugins `json:"plugins"` }
ProcessOptions can be used to configure a process when creating a new one
type Processes ¶
type Processes []*Process
Processes is a list of Process
func (Processes) FindProcess ¶
FindProcess returns the process whose name matches the provided one
type ProcessesMap ¶
ProcessesMap is a mapping of processes indexed by name