cube

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnablePprof bool
	PprofAddr   string
}

type Cube

type Cube struct {
	*Config

	RunnableComponents map[string]Runnable
}

func New

func New(c *Config) *Cube

func (*Cube) Initialize

func (c *Cube) Initialize() error

Initialize init all components of cube, block util initialization completed or error occurred.

func (*Cube) IntegrateWith

func (c *Cube) IntegrateWith(name string, r Runnable)

func (*Cube) Run

func (c *Cube) Run(stop <-chan struct{})

type Runnable

type Runnable interface {
	Run(stop <-chan struct{})
	Initialize() error
}

Runnable run components after initialized

Jump to

Keyboard shortcuts

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