Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Services = map[string]NewService{}
Services is a map of service name and its new function.
Functions ¶
func Register ¶
func Register(name string, newFunc NewService)
Register registers a new serverless service with name and new function.
Types ¶
type NewService ¶
NewService is the function that serverless services need to register at init time.
type Option ¶ added in v1.25.0
type Option func(*Serverless)
func WithLogger ¶ added in v1.25.0
func WithServices ¶ added in v1.25.0
type Serverless ¶
Serverless contains the serveless collection of services.
func New ¶
func New(opt ...Option) (*Serverless, error)
New returns a new serverless collection of services.
func (*Serverless) GracefulStop ¶
func (s *Serverless) GracefulStop() error
GracefulStop gracefully stops the serverless services.
func (*Serverless) Start ¶
func (s *Serverless) Start() error
Start starts the serverless service collection.
func (*Serverless) Stop ¶
func (s *Serverless) Stop() error
Stop stops the serverless services with a one second deadline.
Click to show internal directories.
Click to hide internal directories.