Documentation ¶
Index ¶
- func IgnoredFlag(f *pflag.FlagSet, name, message string)
- func LoadConfig(filename string, pointer interface{}) error
- func ParseConfigFileParameter(args []string) (configFile string)
- func ReadMultiFile(fileListStr string) ([]byte, error)
- func ReadStreamFile(fileName string) ([]byte, error)
- func RegisterExitHandlers(logger logger.Logger, cancelFunc func()) (stop chan struct{})
- func SliceMapToStringMap(m map[string][]string) map[string]string
- func StartServiceAsync(ctx *mbcontext.Context, log logger.Logger, serveFn func() error, ...)
- func ToHttpHeader(headers map[string]interface{}) (httpHeader http.Header)
- func ValidateConfigs(configs ...ValidatableConfig) error
- type RegistrableConfig
- type ValidatableConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoredFlag ¶
IgnoredFlag ignores set value, without any warning
func LoadConfig ¶
LoadConfig read YAML-formatted config from filename into cfg.
func ParseConfigFileParameter ¶
ParseConfigFileParameter Parse -config.file and -config.expand-env option via separate flag set, to avoid polluting default one and calling flag.Parse on it twice.
func ReadMultiFile ¶
func ReadStreamFile ¶
func RegisterExitHandlers ¶
RegisterExitHandlers is used to register exit handlers
func StartServiceAsync ¶
func StartServiceAsync(ctx *mbcontext.Context, log logger.Logger, serveFn func() error, stopFn func() error)
StartServiceAsync is used to start service async
func ToHttpHeader ¶
func ValidateConfigs ¶
func ValidateConfigs(configs ...ValidatableConfig) error
ValidateConfigs is used to validate validatable configs
Types ¶
type RegistrableConfig ¶
type RegistrableConfig interface { // RegisterFlagsWithPrefix is used to registerer flag with prefix RegisterFlagsWithPrefix(prefix string, f *pflag.FlagSet) }
RegistrableConfig defines the registrable config
type ValidatableConfig ¶
type ValidatableConfig interface { // Validate is used to validate config and returns error on failure Validate() error }
ValidatableConfig defines the validatable Config
Directories ¶
Path | Synopsis |
---|---|
Package goproxy HTTP(S)代理, 支持中间人代理解密HTTPS数据
|
Package goproxy HTTP(S)代理, 支持中间人代理解密HTTPS数据 |
cert
Package cert HTTPS证书
|
Package cert HTTPS证书 |
Package grpcurl provides the core functionality exposed by the grpcurl command, for dynamically connecting to a server, using the reflection service to inspect the server, and invoking RPCs.
|
Package grpcurl provides the core functionality exposed by the grpcurl command, for dynamically connecting to a server, using the reflection service to inspect the server, and invoking RPCs. |
ext/ggrpcurl
Command grpcurl makes gRPC requests (a la cURL, but HTTP/2).
|
Command grpcurl makes gRPC requests (a la cURL, but HTTP/2). |
Click to show internal directories.
Click to hide internal directories.