Documentation ¶
Index ¶
- type AcquireInput
- type AcquireOutput
- type Handler
- func (h *Handler) Acquire(ctx context.Context, input *AcquireInput) (*AcquireOutput, error)
- func (h *Handler) ConfigureMiddleware(router *fiber.App)
- func (h *Handler) Join(ctx context.Context, input *JoinInput) (*JoinOutput, error)
- func (h *Handler) RegisterRoutes(api huma.API)
- func (h *Handler) Release(ctx context.Context, input *ReleaseInput) (*ReleaseOutput, error)
- type JoinInput
- type JoinOutput
- type ReleaseInput
- type ReleaseOutput
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquireInput ¶
type AcquireOutput ¶
type Handler ¶
func (*Handler) Acquire ¶
func (h *Handler) Acquire(ctx context.Context, input *AcquireInput) (*AcquireOutput, error)
func (*Handler) ConfigureMiddleware ¶
func (h *Handler) ConfigureMiddleware(router *fiber.App)
func (*Handler) RegisterRoutes ¶
func (h *Handler) RegisterRoutes(api huma.API)
func (*Handler) Release ¶
func (h *Handler) Release(ctx context.Context, input *ReleaseInput) (*ReleaseOutput, error)
type JoinOutput ¶
type ReleaseInput ¶
type ReleaseInput struct {
Key string `path:"key" maxLength:"1024" example:"migration_lock:1" doc:"Key for the lock"`
}
type ReleaseOutput ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides HTTP service.
type Store ¶
type Store interface { // Acquire acquires a lock the given key if it wasn't acquired by somebody else. Acquire(key string, ttl int) error // Release releases a lock for the given key. Release(key string) error // Join joins the node, identitifed by nodeID and reachable at addr, to the cluster. Join(nodeID string, addr string) error }
Store is the interface Raft-backed key-value stores must implement.
Click to show internal directories.
Click to hide internal directories.