Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { Version string Branch string Commit string BuildTime string Closed chan struct{} Stdin io.Reader Stdout io.Writer Stderr io.Writer Server *Server // contains filtered or unexported fields }
Command represents the command executed by "authentication run".
func (*Command) ParseConfig ¶
ParseConfig parses the config at path. Returns a demo configuration if path is blank.
func (*Command) ParseFlags ¶
ParseFlags parses the command line flags from args and returns an options set.
type Config ¶
type Config struct { Meta *meta.Config `toml:"meta"` HTTPD httpd.Config `toml:"http"` Database *database.Config `toml:"database"` RegMeta *regmeta.Config `toml:"service"` Registration registration.Config `toml:"registration"` Selfheal selfheal.Config `toml:"self-heal"` }
Config represents the configuration format for the authentication binary.
func NewConfig ¶
func NewConfig() *Config
NewConfig returns an instance of Config with reasonable defaults.
func NewDemoConfig ¶
NewDemoConfig returns the config that runs when no config is specified.
func (*Config) ApplyEnvOverrides ¶
ApplyEnvOverrides apply the environment configuration on top of the config.
type Options ¶
type Options struct { ConfigPath string PIDFile string Hostname string CPUProfile string MemProfile string }
Options represents the command line options that can be parsed.
type PrintConfigCommand ¶
PrintConfigCommand represents the command executed by "authentication config".
func NewPrintConfigCommand ¶
func NewPrintConfigCommand() *PrintConfigCommand
NewPrintConfigCommand return a new instance of PrintConfigCommand.
func (*PrintConfigCommand) Run ¶
func (cmd *PrintConfigCommand) Run(args ...string) error
Run parses and prints the current config loaded.
type Server ¶
type Server struct { Hostname string BindAddress string Listener net.Listener Services []Service // Profiling CPUProfile string MemProfile string // contains filtered or unexported fields }
Server represents a container for the metadata and storage data and services. It is built using a Config and it manages the startup and shutdown of all services in the proper order.