Documentation ¶
Index ¶
- Variables
- func FetchEndpointInfos(ctx context.Context, client transports.Client, signature signatures.Signature) (infos services.EndpointInfos, err error)
- func NewHandler(signature signatures.Signature, manager services.EndpointsManager, ...) transports.MuxHandler
- func NewManagerHandler(manager services.EndpointsManager) transports.Handler
- func NewShared(client ClientFetcher, signature signatures.Signature) shareds.Shared
- func NewSharedHandler(shared shareds.Shared) transports.Handler
- func NewSharedStoreHandler(store shareds.Store) transports.Handler
- type ClientFetcher
- type Command
- type Handler
- func (handler *Handler) Construct(options transports.MuxHandlerOptions) error
- func (handler *Handler) Handle(w transports.ResponseWriter, r transports.Request)
- func (handler *Handler) Match(_ context.Context, method []byte, path []byte, header transports.Header) bool
- func (handler *Handler) Name() string
- type ManagerHandler
- type Shared
- type SharedHandler
- type SharedStoreHandler
- type Store
- func (store *Store) Close()
- func (store *Store) Expire(ctx context.Context, key []byte, ttl time.Duration) (err error)
- func (store *Store) Get(ctx context.Context, key []byte) (value []byte, has bool, err error)
- func (store *Store) Incr(ctx context.Context, key []byte, delta int64) (v int64, err error)
- func (store *Store) Remove(ctx context.Context, key []byte) (err error)
- func (store *Store) Set(ctx context.Context, key []byte, value []byte) (err error)
- func (store *Store) SetWithTTL(ctx context.Context, key []byte, value []byte, ttl time.Duration) (err error)
- type StoreExpireParam
- type StoreExpireResult
- type StoreGetParam
- type StoreGetResult
- type StoreIncrParam
- type StoreIncrResult
- type StoreRemoveParam
- type StoreRemoveResult
- type StoreSetParam
- type StoreSetResult
- type StoreSetWithTTLParam
- type StoreSetWithTTLResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPath = errors.Warning("fns: invalid path") ErrInvalidBody = errors.Warning("fns: invalid body") ErrSignatureLost = errors.New(488, "***SIGNATURE LOST***", "X-Fns-Signature was required") ErrSignatureUnverified = errors.New(458, "***SIGNATURE INVALID***", "X-Fns-Signature was invalid") )
Functions ¶
func FetchEndpointInfos ¶
func FetchEndpointInfos(ctx context.Context, client transports.Client, signature signatures.Signature) (infos services.EndpointInfos, err error)
func NewHandler ¶
func NewHandler(signature signatures.Signature, manager services.EndpointsManager, shared shareds.Shared) transports.MuxHandler
func NewManagerHandler ¶
func NewManagerHandler(manager services.EndpointsManager) transports.Handler
func NewShared ¶
func NewShared(client ClientFetcher, signature signatures.Signature) shareds.Shared
func NewSharedHandler ¶
func NewSharedHandler(shared shareds.Shared) transports.Handler
func NewSharedStoreHandler ¶
func NewSharedStoreHandler(store shareds.Store) transports.Handler
Types ¶
type ClientFetcher ¶ added in v1.2.80
type ClientFetcher func() transports.Client
type Command ¶
type Command struct { Command string `json:"command"` Payload json.RawMessage `json:"payload"` }
func ParseCommand ¶
func ParseCommand(r transports.Request) (cmd Command, err error)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) Construct ¶
func (handler *Handler) Construct(options transports.MuxHandlerOptions) error
func (*Handler) Handle ¶
func (handler *Handler) Handle(w transports.ResponseWriter, r transports.Request)
type ManagerHandler ¶
type ManagerHandler struct {
// contains filtered or unexported fields
}
func (*ManagerHandler) Handle ¶
func (handler *ManagerHandler) Handle(w transports.ResponseWriter, r transports.Request)
type SharedHandler ¶
type SharedHandler struct {
// contains filtered or unexported fields
}
func (*SharedHandler) Handle ¶
func (handler *SharedHandler) Handle(w transports.ResponseWriter, r transports.Request)
type SharedStoreHandler ¶
type SharedStoreHandler struct {
// contains filtered or unexported fields
}
func (*SharedStoreHandler) Handle ¶
func (handler *SharedStoreHandler) Handle(w transports.ResponseWriter, r transports.Request)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
type StoreExpireParam ¶ added in v1.2.83
type StoreExpireResult ¶ added in v1.2.83
type StoreExpireResult struct {
Error json.RawMessage `json:"error"`
}
type StoreGetParam ¶
type StoreGetParam struct {
Key []byte `json:"key"`
}
type StoreGetResult ¶
type StoreGetResult struct { Value []byte `json:"value"` Has bool `json:"has"` Error json.RawMessage `json:"error"` }
type StoreIncrParam ¶
type StoreIncrResult ¶
type StoreIncrResult struct { N int64 `json:"n"` Error json.RawMessage `json:"error"` }
type StoreRemoveParam ¶
type StoreRemoveParam struct {
Key []byte `json:"key"`
}
type StoreRemoveResult ¶
type StoreRemoveResult struct {
Error json.RawMessage `json:"error"`
}
type StoreSetParam ¶
type StoreSetResult ¶
type StoreSetResult struct {
Error json.RawMessage `json:"error"`
}
type StoreSetWithTTLParam ¶
type StoreSetWithTTLResult ¶
type StoreSetWithTTLResult struct {
Error json.RawMessage `json:"error"`
}
Click to show internal directories.
Click to hide internal directories.