daemon

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModule added in v0.0.2

type BaseModule struct {
}

func (BaseModule) AfterDaemonStarted added in v0.0.2

func (b BaseModule) AfterDaemonStarted(dm *Daemon)

func (BaseModule) BeforeDaemonStarting added in v0.0.2

func (b BaseModule) BeforeDaemonStarting(cmd *cobra.Command, dm *Daemon)

func (BaseModule) Factories added in v0.0.2

func (b BaseModule) Factories() (facs []worker.Factory)

func (BaseModule) GetConfig added in v0.0.2

func (b BaseModule) GetConfig() types.ModuleConfig

func (BaseModule) GetFactory added in v0.0.2

func (b BaseModule) GetFactory(name string) worker.Factory

func (BaseModule) Init added in v0.0.2

func (b BaseModule) Init(config *config.Config)

func (BaseModule) Name added in v0.0.2

func (b BaseModule) Name() string

type BaseModuleProvider added in v0.0.2

type BaseModuleProvider struct {
}

func (*BaseModuleProvider) AddFlags added in v0.0.2

func (b *BaseModuleProvider) AddFlags(cmd *cobra.Command)

func (*BaseModuleProvider) GetDefaultConfig added in v0.0.2

func (b *BaseModuleProvider) GetDefaultConfig() types.ModuleConfig

func (*BaseModuleProvider) InitFile added in v0.0.2

func (b *BaseModuleProvider) InitFile(config *config.Config)

func (*BaseModuleProvider) NewModule added in v0.0.2

func (b *BaseModuleProvider) NewModule(tmCfg *config.Config, config common.DaemonConfig) Module

type BaseProvider

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

func (*BaseProvider) AddFlags added in v0.0.2

func (provider *BaseProvider) AddFlags(cmd *cobra.Command)

func (*BaseProvider) AddModuleProvider added in v0.0.2

func (provider *BaseProvider) AddModuleProvider(moduleProvider ModuleProvider)

func (*BaseProvider) InitFiles added in v0.0.2

func (provider *BaseProvider) InitFiles(config *cfg.Config, daemonConfig *common.DaemonConfig)

func (*BaseProvider) NewDaemon

func (provider *BaseProvider) NewDaemon(cmd *cobra.Command, tmCfg *cfg.Config, logger log.Logger,
	tmNode *node.Node, daemonApp *tm.DaemonApp, config common.DaemonConfig) *Daemon

type Daemon

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

func NewDaemon

func NewDaemon(tmCfg *cfg.Config, logger log.Logger, tmNode *node.Node, config common.DaemonConfig,
	spaceRegistry types.SpaceRegistry) (dm *Daemon)

func (*Daemon) AddModule added in v0.0.2

func (dm *Daemon) AddModule(module Module)

func (*Daemon) GetClient

func (dm *Daemon) GetClient() types.Client

func (*Daemon) GetCluster

func (dm *Daemon) GetCluster() *cluster.Cluster

func (*Daemon) GetContext

func (dm *Daemon) GetContext() common.Context

func (*Daemon) GetDaemonConfig

func (dm *Daemon) GetDaemonConfig() common.DaemonConfig

func (*Daemon) GetJobRepository

func (dm *Daemon) GetJobRepository() job.Repository

func (*Daemon) GetModule added in v0.0.2

func (dm *Daemon) GetModule(name string) Module

func (*Daemon) GetTMConfig

func (dm *Daemon) GetTMConfig() cfg.Config

func (*Daemon) ID

func (dm *Daemon) ID() string

func (*Daemon) IsLeaderNode

func (dm *Daemon) IsLeaderNode() bool

func (*Daemon) NewWorkerProxy added in v0.0.2

func (dm *Daemon) NewWorkerProxy(jobID string) (worker.Proxy, error)

func (*Daemon) RegisterWorkerFactory

func (dm *Daemon) RegisterWorkerFactory(factory worker.Factory)

RegisterWorkerFactory register worker.Factory

func (*Daemon) SetJobOrganizer

func (dm *Daemon) SetJobOrganizer(organizer job.Organizer)

func (*Daemon) Start

func (dm *Daemon) Start()

type Module added in v0.0.2

type Module interface {
	Name() string
	GetFactory(name string) worker.Factory
	Factories() (facs []worker.Factory)
	Init(config *config.Config)
	GetConfig() types.ModuleConfig
	BeforeDaemonStarting(cmd *cobra.Command, dm *Daemon)
	AfterDaemonStarted(dm *Daemon)
}

존재 이유가 약함

type ModuleProvider added in v0.0.2

type ModuleProvider interface {
	NewModule(tmCfg *config.Config, config common.DaemonConfig) Module
	GetDefaultConfig() types.ModuleConfig
	AddFlags(cmd *cobra.Command)
	InitFile(config *config.Config)
}

type Provider

type Provider func(tmCfg *cfg.Config, logger log.Logger, tmNode *node.Node, daemonApp *tm.DaemonApp, config common.DaemonConfig) *Daemon

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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