manager

package
v3.0.8-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventHost           = "host"
	EventHostIdentifier = "hostidentifier"
	EventSet            = "set"
	EventModule         = "module"
	EventBusiness       = "biz"
	EventPlat           = "plat"
	EventInst           = "inst"

	EventModuleTransfer = "moduletransfer"
	EventActionCreate   = "create"
	EventActionDelete   = "delete"
	EventActionUpdate   = "update"
)

Variables

This section is empty.

Functions

func Delete

func Delete(mgr *Manager) error

Delete delete the framework instance

Types

type Action

type Action struct {
	Method      string
	Path        string
	HandlerFunc func(data types.MapStr) (types.MapStr, error)
}

Action the http action

type FrameworkContext

type FrameworkContext interface {
}

FrameworkContext definition the framework context

type Manager

type Manager struct {
	OutputerMgr output.Manager
	InputerMgr  input.Manager
	// contains filtered or unexported fields
}

Manager contains the basic framework data and the publisher client used to publis events.

func New

func New() *Manager

New return a new Manager instance

func (*Manager) Actions

func (m *Manager) Actions() []httpserver.Action

Actions returns metricActions

func (*Manager) CreateFrameworkContext

func (cli *Manager) CreateFrameworkContext() FrameworkContext

CreateFrameworkContext create a new framework context instance

func (*Manager) RegisterEvent

func (cli *Manager) RegisterEvent(key types.EventKey, eventType types.EventType, eventFunc types.EventCallbackFunc) types.EventKey

RegisterEvent register cmdb 3.0 event

func (*Manager) Run

func (cli *Manager) Run(ctx context.Context, cancel context.CancelFunc)

Run start the business cycle until the stop method is called.

func (*Manager) UnRegisterEvent

func (cli *Manager) UnRegisterEvent(eventKey types.EventKey)

UnRegisterEvent unregister cmdb 3.0 event

Jump to

Keyboard shortcuts

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