Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(main MainFunction, onTuningState TuningStateCallbackFunction, disableRegistration bool)
Used to start the program with the correct arguments and logging, with service discovery registration and all dependencies resolved
Types ¶
type MainFunction ¶
type MainFunction func(serviceInformation ResolvedService, initialTuningState *pb_systemmanager_messages.TuningState) error
The main function to run
type ResolvedDependency ¶
type ResolvedDependency struct { ServiceName string // the name of the service that this service depends on OutputName string // the name of the output that this service needs from the dependency Address string // the address of the output that this service needs from the dependency }
A resolved dependency, which will be given back to the service
type ResolvedService ¶
type ResolvedService struct { Name string // the name of the service Pid int // the pid of the service Dependencies []ResolvedDependency // the dependencies of the service, already resolved Outputs []output // the outputs of this service }
func (ResolvedService) GetDependencyAddress ¶
func (service ResolvedService) GetDependencyAddress(serviceName string, outputName string) (string, error)
Utiliy function to get the address of a dependency
func (ResolvedService) GetOutputAddress ¶
func (service ResolvedService) GetOutputAddress(outputName string) (string, error)
Utility function to get the address of your own output
type SystemManagerDetails ¶
type SystemManagerDetails struct {
// contains filtered or unexported fields
}
The system manager exposes two endpoints: a pub/sub endpoint for broadcasting service registration and a req/rep endpoint for registering services and resolving dependencies this struct is used to store the addresses of these endpoints
type TuningStateCallbackFunction ¶ added in v0.2.8
type TuningStateCallbackFunction func(tuningState *pb_systemmanager_messages.TuningState)
The function that is called when a new tuning state is recevied
Click to show internal directories.
Click to hide internal directories.