factory

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationFactory

type ApplicationFactory interface {
	// Name server application
	Name() string
	// Serve for running server or worker
	Serve()
	// Shutdown stop the server or worker
	Shutdown(ctx context.Context)
}

ApplicationFactory factory for server and/or worker abstraction

type ServiceFactory

type ServiceFactory interface {
	// Name service name
	Name() string

	// GetApplications return all applications (servers, workers and/or brokers)
	GetApplications() map[string]ApplicationFactory

	// RESTHandler return abstraction of rest-api handler
	RESTHandler() abstract.RestHandler

	// GRPCHandler return abstraction of grpc handler
	GRPCHandler() abstract.GRPCHandler

	// BrokerHandler return abstraction of broker handler by types.Broker
	BrokerHandler(broker types.Broker) abstract.BrokerHandler

	// GetBroker return abstraction of broker configuration by types.Broker
	GetBroker(broker types.Broker) abstract.Broker
}

ServiceFactory abstraction of service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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