Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientOptions
- type DefaultTool
- func (d *DefaultTool) AbsorbLoad(ctx context.Context, c fmt.Stringer, ttl time.Duration) (bool, error)
- func (d *DefaultTool) Claim(ctx context.Context, key fmt.Stringer, owner string) (bool, error)
- func (d *DefaultTool) ClaimRun(ctx context.Context, opts contract.ClaimRunOptions) (bool, error)
- func (d *DefaultTool) ClaimRunReembed(ctx context.Context, opts contract.ClaimRunReembedOptions) (bool, error)
- func (d *DefaultTool) ClaimRunStatsPop(ctx context.Context, opts contract.ClaimRunStatsPopOptions) (bool, error)
- func (d *DefaultTool) Close(ctx context.Context) error
- func (d *DefaultTool) Extend(ctx context.Context, key fmt.Stringer, owner string) (bool, error)
- func (d *DefaultTool) Release(ctx context.Context, key fmt.Stringer, owner string) error
- type Dependencies
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
contract.ArbiterOperator
}
func NewClient ¶
func NewClient(d Dependencies, opts ClientOptions) (Client, error)
type ClientOption ¶
type ClientOption func(*ClientOptions)
func WithTimeout ¶
func WithTimeout(x time.Duration) ClientOption
type ClientOptions ¶
func ApplyClientOptions ¶
func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions
type DefaultTool ¶
func NewTool ¶
func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool
func (*DefaultTool) AbsorbLoad ¶ added in v0.1.773
func (d *DefaultTool) AbsorbLoad(ctx context.Context, c fmt.Stringer, ttl time.Duration) (bool, error)
AbsorbLoad sets a unique key with the given TTL, returns true if load is absorbed (key already present), or false if key was just created.
func (*DefaultTool) ClaimRun ¶
func (d *DefaultTool) ClaimRun(ctx context.Context, opts contract.ClaimRunOptions) (bool, error)
ClaimRun attempts to claim a generic run.
func (*DefaultTool) ClaimRunReembed ¶
func (d *DefaultTool) ClaimRunReembed(ctx context.Context, opts contract.ClaimRunReembedOptions) (bool, error)
ClaimRunReembed attempts to claim a reembedding run.
func (*DefaultTool) ClaimRunStatsPop ¶ added in v0.1.773
func (d *DefaultTool) ClaimRunStatsPop(ctx context.Context, opts contract.ClaimRunStatsPopOptions) (bool, error)
ClaimRunStatsPop attempts to claim a feed statistics population run.
func (*DefaultTool) Close ¶
func (d *DefaultTool) Close(ctx context.Context) error
Close closes the underlying client.
type Dependencies ¶
type Dependencies struct {
C contract.ArbiterOperator
}
Click to show internal directories.
Click to hide internal directories.