standard

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 0 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 interface {
	// Name defines component's unique name, such as "my.grpc.server".
	Name() string
	// PackageName presents component's package name, such as "server.grpc".
	PackageName() string
	// Init defines component's Instantiation procedure.
	Init() error
	// Start defines component's start procedure.
	Start() error
	// Stop defines component's stop procedure.
	Stop() error
}

Component defines a pluggable and cohesive module. For server Component, when Instantiated, it's hole lifecycle will be scheduled by Ego app framework.

User can implement their own Component, if they register their Server Component to Ego app, it's starting and stopping will also be controlled by framework.

Jump to

Keyboard shortcuts

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