component

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	camStatics.ComponentInterface
	// contains filtered or unexported fields
}

base component struct

func (*Component) Init

func (comp *Component) Init(configInterface camStatics.ComponentConfigInterface)

init config

func (*Component) Name added in v0.4.0

func (comp *Component) Name() string

component name

func (*Component) Recover

func (comp *Component) Recover(rec interface{})

recover

func (*Component) Start

func (comp *Component) Start()

start

func (*Component) Stop

func (comp *Component) Stop()

stop

type ComponentConfig

type ComponentConfig struct {
	camStatics.ComponentConfigInterface
	Component camStatics.ComponentInterface // Instance of corresponding component
	// contains filtered or unexported fields
}

base config

func (*ComponentConfig) GetRecoverHandler

func (config *ComponentConfig) GetRecoverHandler() camStatics.RecoverHandler

get recover handler

func (*ComponentConfig) NewComponent

func (config *ComponentConfig) NewComponent() camStatics.ComponentInterface

get component instance

func (*ComponentConfig) RecoverHandler

func (config *ComponentConfig) RecoverHandler(handler camStatics.RecoverHandler)

set recover handler It can recover panic, but not all, only component release. For example, the panic thrown by the controller can be handled

Directories

Path Synopsis
From: https://github.com/jordan-wright/email Datetime: 2020-03-09 17:28:00 From: https://github.com/jordan-wright/email Datetime: 2020-03-09 17:28:00
From: https://github.com/jordan-wright/email Datetime: 2020-03-09 17:28:00 From: https://github.com/jordan-wright/email Datetime: 2020-03-09 17:28:00

Jump to

Keyboard shortcuts

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