cmd

package
v0.0.0-...-303e327 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string)

func RegisterGracefulModule

func RegisterGracefulModule(m *Module)

func RegisterModule

func RegisterModule(m *Module)

Types

type Config

type Config struct {
	MaxProcs         int       `json:"max_procs"`
	LogConf          LogConfig `json:"log"`
	BindAddr         string    `json:"bind_addr"`
	ShutdownTimeoutS int       `json:"shutdown_timeout_s"`

	AuditLog auditlog.Config `json:"auditlog"`
	Auth     auth.Config     `json:"auth"`
}

type LogConfig

type LogConfig struct {
	Level      log.Level `json:"level"`
	Filename   string    `json:"filename"`
	MaxSize    int       `json:"maxsize"`
	MaxAge     int       `json:"maxage"`
	MaxBackups int       `json:"maxbackups"`
}

type Module

type Module struct {
	Name       string
	InitConfig func(args []string) (*Config, error)
	SetUp      func() (*rpc.Router, []rpc.ProgressHandler)
	TearDown   func()
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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