stamper

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *ClientConfig) *Client

func (*Client) Create

func (s *Client) Create(ctx context.Context, duration time.Duration, depth uint16, postageLabel string) error

Create creates a postage batch.

func (*Client) Dilute

func (s *Client) Dilute(ctx context.Context, usageThreshold float64, dilutionDepth uint16, opts ...Option) error

Dilute dilutes a postage batch.

func (*Client) Set

func (s *Client) Set(ctx context.Context, ttlThreshold time.Duration, topupTo time.Duration, usageThreshold float64, dilutionDepth uint16, opts ...Option) error

Set sets the topup and dilution parameters.

func (*Client) Topup

func (s *Client) Topup(ctx context.Context, ttlThreshold time.Duration, topupTo time.Duration, opts ...Option) (err error)

Topup tops up a postage batch.

type ClientConfig

type ClientConfig struct {
	Log           logging.Logger
	Namespace     string
	K8sClient     *k8s.Client
	SwapClient    swap.Client
	BeeClients    map[string]*bee.Client
	LabelSelector string
	InCluster     bool
}

type Option

type Option func(*options)

func WithBatchIDs

func WithBatchIDs(batchIds []string) Option

func WithPostageLabels added in v0.26.0

func WithPostageLabels(postageLabels []string) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL