Versions in this module Expand all Collapse all v4 v4.7.1 Feb 23, 2023 Changes in this version + var DefaultAddress = ":0" + var DefaultId = uuid.New().String() + var DefaultName = "go-web" + var DefaultRegisterCheck = func(context.Context) error + var DefaultRegisterInterval = time.Second * 30 + var DefaultRegisterTTL = time.Second * 90 + var DefaultStaticDir = "html" + var DefaultVersion = "latest" + type Option func(o *Options) + func Action(a func(*cli.Context)) Option + func Address(a string) Option + func Advertise(a string) Option + func AfterStart(fn func() error) Option + func AfterStop(fn func() error) Option + func BeforeStart(fn func() error) Option + func BeforeStop(fn func() error) Option + func Context(ctx context.Context) Option + func Flags(flags ...cli.Flag) Option + func HandleSignal(b bool) Option + func Handler(h http.Handler) Option + func Icon(ico string) Option + func Id(id string) Option + func Metadata(md map[string]string) Option + func MicroService(s micro.Service) Option + func Name(n string) Option + func RegisterCheck(fn func(context.Context) error) Option + func RegisterInterval(t time.Duration) Option + func RegisterTTL(t time.Duration) Option + func Registry(r registry.Registry) Option + func Secure(b bool) Option + func Server(srv *http.Server) Option + func StaticDir(d string) Option + func TLSConfig(t *tls.Config) Option + func Version(v string) Option + type Options struct + Action func(*cli.Context) + Address string + Advertise string + AfterStart []func() error + AfterStop []func() error + BeforeStart []func() error + BeforeStop []func() error + Context context.Context + Flags []cli.Flag + Handler http.Handler + Id string + Metadata map[string]string + Name string + RegisterCheck func(context.Context) error + RegisterInterval time.Duration + RegisterTTL time.Duration + Registry registry.Registry + Secure bool + Server *http.Server + Service micro.Service + Signal bool + StaticDir string + TLSConfig *tls.Config + Version string + type Service interface + Client func() *http.Client + Handle func(pattern string, handler http.Handler) + HandleFunc func(pattern string, handler func(http.ResponseWriter, *http.Request)) + Init func(opts ...Option) error + Options func() Options + Run func() error + func NewService(opts ...Option) Service