Versions in this module Expand all Collapse all v1 v1.6.1 Jul 9, 2019 Changes in this version + const TYPE_API + const TYPE_GENERIC + const TYPE_GRPC + const TYPE_REST + var HttpMetaJwtClientApp = "JwtClientApp" + var HttpMetaJwtIssuer = "JwtIssuer" + func ApplyMigrations(ctx context.Context, current *version.Version, target *version.Version, ...) (*version.Version, error) + func FirstRun() *version.Version + func JWTHttpWrapper(h http.Handler) http.Handler + func LastKnownVersion(serviceName string) (v *version.Version, e error) + func Latest() *version.Version + func NewBackoffClientWrapper() client.Wrapper + func NewClaimsHandlerWrapper() server.HandlerWrapper + func NewConfigHandlerWrapper(service micro.Service) server.HandlerWrapper + func NewConfigHttpHandlerWrapper(h http.Handler, serviceName string) (http.Handler, error) + func NewDAOClientWrapper(v dao.DAO) client.Wrapper + func NewDAOHandlerWrapper(val dao.DAO) server.HandlerWrapper + func NewDAOSubscriberWrapper(val dao.DAO) server.SubscriberWrapper + func NewLogHandlerWrapper(name string, color uint64) server.HandlerWrapper + func NewLogHttpHandlerWrapper(h http.Handler, serviceName string, serviceColor uint64) http.Handler + func PolicyHttpWrapper(h http.Handler) http.Handler + func RegisterSwaggerJson(json string) + func RestError401(req *restful.Request, resp *restful.Response, err error) + func RestError403(req *restful.Request, resp *restful.Response, err error) + func RestError404(req *restful.Request, resp *restful.Response, err error) + func RestError500(req *restful.Request, resp *restful.Response, err error) + func RestErrorDetect(req *restful.Request, resp *restful.Response, err error, defaultCode ...int32) + func Retry(f func() error, seconds ...time.Duration) error + func SwaggerSpec() *loads.Document + func UpdateServiceVersion(s Service) error + func UpdateVersion(serviceName string, v *version.Version) error + func ValidVersion(v string) *version.Version + type Checker interface + Check func() error + type CheckerFunc func() error + func (f CheckerFunc) Check() error + type ChildrenRunner struct + func NewChildrenRunner(parentService micro.Service, parentName string, childPrefix string) *ChildrenRunner + func (c *ChildrenRunner) FilterOutSource(ctx context.Context, sourceName string) bool + func (c *ChildrenRunner) OnDeleteConfig(callback func(context.Context, string)) + func (c *ChildrenRunner) Start(ctx context.Context, source string) error + func (c *ChildrenRunner) StartFromInitialConf(ctx context.Context, cfg common.ConfigValues) + func (c *ChildrenRunner) StopAll(ctx context.Context) + func (c *ChildrenRunner) Watch(ctx context.Context) error + type HandlerProvider func(micro.Service) interface + type Migration struct + Down func(ctx context.Context) error + TargetVersion *version.Version + Up func(ctx context.Context) error + type ProtoEntityReaderWriter struct + func (e *ProtoEntityReaderWriter) Read(req *restful.Request, v interface{}) error + func (e *ProtoEntityReaderWriter) Write(resp *restful.Response, status int, v interface{}) error + type RestHandlerBuilder func(service web.Service, defaultClient client.Client) interface + type Runner interface + Run func() error + type RunnerFunc func() error + func (f RunnerFunc) Run() error + type Service interface + Init func(...ServiceOption) + Options func() ServiceOptions + func NewService(opts ...ServiceOption) Service + type ServiceOption func(*ServiceOptions) + func AfterInit(fn func(Service) error) ServiceOption + func AfterStart(fn func(Service) error) ServiceOption + func AfterStop(fn func(Service) error) ServiceOption + func AutoStart(b bool) ServiceOption + func BeforeInit(fn func(Service) error) ServiceOption + func BeforeStart(fn func(Service) error) ServiceOption + func BeforeStop(fn func(Service) error) ServiceOption + func Cancel(c context.CancelFunc) ServiceOption + func Context(c context.Context) ServiceOption + func Dependency(n string, t []string) ServiceOption + func Description(d string) ServiceOption + func Fork(b bool) ServiceOption + func Migrations(migrations []*Migration) ServiceOption + func Name(n string) ServiceOption + func PluginBoxes(boxes ...frontend.PluginBox) ServiceOption + func Port(p string) ServiceOption + func Regexp(r string) ServiceOption + func RouterDependencies() ServiceOption + func Source(s string) ServiceOption + func Tag(t ...string) ServiceOption + func Unique(b bool) ServiceOption + func Version(v string) ServiceOption + func WithChecker(c Checker) ServiceOption + func WithGeneric(f func(context.Context, context.CancelFunc) (Runner, Checker, Stopper, error), ...) ServiceOption + func WithMicro(f func(micro.Service) error) ServiceOption + func WithMicroChildrenRunner(parentName string, childrenPrefix string, cleanEndpointBeforeDelete bool, ...) ServiceOption + func WithStorage(d func(dao.DAO) dao.DAO, prefix ...interface{}) ServiceOption + func WithWeb(handler func() WebHandler, opts ...web.Option) ServiceOption + func WithWebAuth() ServiceOption + func WithWebHandler(h func(http.Handler) http.Handler) ServiceOption + func WithWebSession(excludes ...string) ServiceOption + type ServiceOptions struct + AfterInit []func(Service) error + AfterStart []func(Service) error + AfterStop []func(Service) error + AutoStart bool + BeforeInit []func(Service) error + BeforeStart []func(Service) error + BeforeStop []func(Service) error + Cancel context.CancelFunc + Checker Checker + Context context.Context + DAO func(dao.DAO) dao.DAO + Dependencies []*dependency + Description string + Flags pflag.FlagSet + Fork bool + Micro micro.Service + MicroInit func(Service) error + Migrations []*Migration + MinNumberOfNodes int + Name string + OnRegexpMatch func(Service, []string) error + Port string + Prefix interface{} + Regexp *regexp.Regexp + Registry registry.Registry + Source string + Tags []string + Unique bool + Version string + Web web.Service + WebInit func(Service) error + type StatusHandler struct + func (sh *StatusHandler) Status(ctx context.Context, in *empty.Empty, out *proto.StatusResponse) error + type StopFunctionKey struct + type StopHandler struct + func (s *StopHandler) Process(ctx context.Context, in *proto.StopEvent) error + type Stopper interface + Stop func() error + type StopperFunc func() error + func (f StopperFunc) Stop() error + type WebHandler interface + Filter func() func(string) string + SwaggerTags func() []string Incompatible versions in this module v2.0.6+incompatible Apr 23, 2020