config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServer

func CreateServer(args []string, funcs ...Option) (srv *server.Server)

CreateServer create server from config flags. Returns nil on version or help command

func NewImagor

func NewImagor(
	fs *flag.FlagSet, cb func() (*zap.Logger, bool), funcs ...Option,
) *imagor.Imagor

NewImagor create imagor from config flags

Types

type CIDRSliceFlag

type CIDRSliceFlag []*net.IPNet

CIDRSliceFlag is a flag type which support comma separated CIDR expressions.

func (*CIDRSliceFlag) Get

func (s *CIDRSliceFlag) Get() any

Get implements flag.Getter interface

func (*CIDRSliceFlag) Set

func (s *CIDRSliceFlag) Set(value string) error

Set implements flag.Setter interface

func (*CIDRSliceFlag) String

func (s *CIDRSliceFlag) String() string

String implements flag.Setter interface

type Option

type Option func(fs *flag.FlagSet, cb func() (logger *zap.Logger, isDebug bool)) imagor.Option

Option flag based config option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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