Documentation ¶
Index ¶
- Variables
- func AcquireLocker(ctx context.Context, key []byte, ttl time.Duration) (locker shareds.Locker, err error)
- func AppId(ctx context.Context) []byte
- func AppName(ctx context.Context) string
- func AppVersion(ctx context.Context) versions.Version
- func Barrier(ctx context.Context, key []byte, fn func() (result interface{}, err error)) (result barriers.Result, err error)
- func CheckHealth(ctx context.Context, client transports.Client) (ok bool)
- func Endpoints(ctx context.Context) services.Endpoints
- func Execute(ctx context.Context, task workers.Task)
- func HealthHandler() transports.MuxHandler
- func Middleware(rt *Runtime) transports.Middleware
- func SharedStore(ctx context.Context) (store shareds.Store)
- func TryExecute(ctx context.Context, task workers.Task) bool
- func With(ctx context.Context, rt *Runtime) context.Context
- type Health
- type Runtime
- func (rt *Runtime) AppId() []byte
- func (rt *Runtime) AppName() string
- func (rt *Runtime) AppVersion() versions.Version
- func (rt *Runtime) Barrier() barriers.Barrier
- func (rt *Runtime) Endpoints() services.Endpoints
- func (rt *Runtime) Execute(ctx context.Context, task workers.Task)
- func (rt *Runtime) RootLog() logs.Logger
- func (rt *Runtime) Running() (running bool, serving bool)
- func (rt *Runtime) Shared() shareds.Shared
- func (rt *Runtime) TryExecute(ctx context.Context, task workers.Task) bool
- func (rt *Runtime) Workers() workers.Workers
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTooEarly = errors.New(http.StatusTooEarly, "***TOO EARLY***", "fns: service is not ready, try later again") )
Functions ¶
func AcquireLocker ¶
func CheckHealth ¶
func CheckHealth(ctx context.Context, client transports.Client) (ok bool)
func HealthHandler ¶
func HealthHandler() transports.MuxHandler
func Middleware ¶
func Middleware(rt *Runtime) transports.Middleware
Types ¶
type Health ¶
type Health struct { Id string `json:"id" avro:"id"` Name string `json:"name" avro:"name"` Version string `json:"version" avro:"version"` Running bool `json:"running" avro:"running"` Serving bool `json:"serving" avro:"serving"` Launch time.Time `json:"launch" avro:"launch"` Now time.Time `json:"now" avro:"now"` }
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func (*Runtime) AppVersion ¶
func (*Runtime) TryExecute ¶
Click to show internal directories.
Click to hide internal directories.