common

package
v2.3.0-rc.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateStandby uint32 = iota
	StateStart
	StateRunning
	StateShutdown
	StateStopped
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

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

func (*Control) Shutdown

func (c *Control) Shutdown(s Server, do DoShutdownFunc)

func (*Control) Start

func (c *Control) Start(s Server, cfg *config.Config, do DoStartFunc) (err error)

func (*Control) Sync

func (c *Control) Sync()

type DoShutdownFunc

type DoShutdownFunc func(s Server)

type DoStartFunc

type DoStartFunc func(s Server, cfg *config.Config) (err error)

type Server

type Server interface {
	Start(cfg *config.Config) error
	Shutdown()
	// Sync will block invoker goroutine until this MetaNode shutdown.
	Sync()
}

Jump to

Keyboard shortcuts

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