Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(options ...Option)
Initialize create the whole world of the current application.
Types ¶
type ListenerOption ¶
type ListenerOption struct { Type ListenerType `yaml:"listener_type"` NetType string `yaml:"listener_net_type"` Addr string `yaml:"listener_addr"` }
type ListenerType ¶
type ListenerType int
const ( ListenerTypeTcp ListenerType = iota ListenerTypeGRPC ListenerTypeHTTP )
func (ListenerType) String ¶
func (l ListenerType) String() string
type LoggerOption ¶
type Option ¶
type Option func(o *Options)
func Listeners ¶
func Listeners(listeners ...ListenerOption) Option
func LogLevelFilter ¶
func ServiceName ¶
func ServiceVersion ¶
type Options ¶
type Options struct { Namespace string `yaml:"namespace"` ServiceName string `yaml:"service_name"` ServiceID string `yaml:"service_id"` ServiceVersion string `yaml:"service_version"` Metadata metadata.Metadata `yaml:"metadata"` Listeners []ListenerOption `yaml:"listeners"` Logger LoggerOption `yaml:"logger"` Trace TraceOption `yaml:"trace"` Registry RegistryOption `yaml:"registry"` Resilience ResilienceOption `yaml:"resilience"` }
Options is the thor application global configuration.
func OptionReader ¶
func OptionReader() Options
type RegistryOption ¶
type RegistryType ¶
type RegistryType int
const ( RegistryTypeEtcd RegistryType = iota RegistryTypeConsul RegistryTypeK8s RegistryMdns )
func (RegistryType) String ¶
func (r RegistryType) String() string
type ResilienceOption ¶
type ResilienceOption struct {
RetryOnIdempotent bool `yaml:"retry_on_idempotent"`
}
type TraceOption ¶
Click to show internal directories.
Click to hide internal directories.