worker

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_RUN   = 1
	CMD_PAUSE = 2
	CMD_STOP  = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentInfo

type AgentInfo struct {
	LastUpdatedTime int64
}

the detail of service

func NewAgentInfo

func NewAgentInfo() *AgentInfo

func (*AgentInfo) SetLastUpdatedTime

func (myself *AgentInfo) SetLastUpdatedTime(t int64)

type EtcdRegisterWorker

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

func NewEtcdRegisterWorker

func NewEtcdRegisterWorker(nodeId string, cli *clientv3.Client, roles []string) *EtcdRegisterWorker

func (*EtcdRegisterWorker) Start

func (s *EtcdRegisterWorker) Start() error

func (*EtcdRegisterWorker) Stop

func (s *EtcdRegisterWorker) Stop()

type EtcdWatcherWorker

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

func NewEtcdWatcherWorker

func NewEtcdWatcherWorker(nodeId string, cli *clientv3.Client) *EtcdWatcherWorker

func (*EtcdWatcherWorker) GetRuntimeNodeIds

func (myself *EtcdWatcherWorker) GetRuntimeNodeIds() []string

GetRuntimeNodeIds

func (*EtcdWatcherWorker) Start

func (myself *EtcdWatcherWorker) Start() error

func (*EtcdWatcherWorker) Stop

func (myself *EtcdWatcherWorker) Stop() error

func (*EtcdWatcherWorker) WatcherQueueResp

func (myself *EtcdWatcherWorker) WatcherQueueResp(key string, newCbs ...api.Callback)

type NatsMQWorker

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

workerManager monitor all running services, if facade mode

func NewNatsMQWorker

func NewNatsMQWorker(natsConn stan.Conn) *NatsMQWorker

func (*NatsMQWorker) RequestHandler

func (myself *NatsMQWorker) RequestHandler(fn func(req *schema.ReqQ))

func (*NatsMQWorker) Run

func (myself *NatsMQWorker) Run()

func (*NatsMQWorker) Stop

func (myself *NatsMQWorker) Stop()

Stop send commond stop

type QueueWatcher

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

func NewQueueWatcher

func NewQueueWatcher(client *clientv3.Client) *QueueWatcher

func (*QueueWatcher) SetCallbacks

func (myself *QueueWatcher) SetCallbacks(newCbs ...api.Callback)

func (*QueueWatcher) SetEventKey

func (myself *QueueWatcher) SetEventKey(eventKey string)

Jump to

Keyboard shortcuts

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