daemon

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package daemon implements the daemon command for any microservice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsInvalidFlag

func IsInvalidFlag(err error) bool

IsInvalidFlag asserts invalidFlagError.

Types

type Command

type Command interface {
	// CobraCommand returns the actual cobra command for the daemon command.
	CobraCommand() *cobra.Command
	// Execute represents the cobra run method.
	Execute(cmd *cobra.Command, args []string)
}

Command represents the daemon command for any microservice.

func New

func New(config Config) (Command, error)

New creates a new daemon command.

type Config

type Config struct {
	Logger        micrologger.Logger
	ServerFactory ServerFactory

	Viper *viper.Viper
}

Config represents the configuration used to create a new daemon command.

type ServerFactory

type ServerFactory func(v *viper.Viper) server.Server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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