client

package
v0.8.37 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0, MIT Imports: 17 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
}

Client is an http client for the indexer finder API,

func New

func New(baseURL string, options ...Option) (*Client, error)

New creates a new admin HTTP client.

func (*Client) Allow

func (c *Client) Allow(ctx context.Context, peerID peer.ID) error

Allow configures the indexer to allow the peer to publish messages and provide content.

func (*Client) Assign

func (c *Client) Assign(ctx context.Context, peerID peer.ID) error

Assign assigns a publish to an indexer, when the indexer is configured to work with an assigner service.

func (*Client) Block

func (c *Client) Block(ctx context.Context, peerID peer.ID) error

Block configures indexer to block the peer from publishing messages and providing content.

func (*Client) Freeze

func (c *Client) Freeze(ctx context.Context) error

func (*Client) GetAllTelemetry added in v0.8.0

func (c *Client) GetAllTelemetry(ctx context.Context) (map[string]rate.Rate, error)

func (*Client) GetPendingSyncs

func (c *Client) GetPendingSyncs(ctx context.Context) ([]string, error)

func (*Client) GetTelemetry added in v0.8.0

func (c *Client) GetTelemetry(ctx context.Context, providerID peer.ID) (rate.Rate, bool, error)

func (*Client) Handoff

func (c *Client) Handoff(ctx context.Context, publisherID, frozenID peer.ID, frozenURL string) error

func (*Client) ImportProviders

func (c *Client) ImportProviders(ctx context.Context, fromURL *url.URL) error

ImportProviders

func (*Client) ListAssignedPeers

func (c *Client) ListAssignedPeers(ctx context.Context) (map[peer.ID]peer.ID, error)

ListAssignedPeers gets a list of explicitly allowed peers, if indexer is configured to work with an assigner service.

func (*Client) ListLogSubSystems

func (c *Client) ListLogSubSystems(ctx context.Context) ([]string, error)

func (*Client) ListPreferredPeers

func (c *Client) ListPreferredPeers(ctx context.Context) ([]peer.ID, error)

ListPreferredPeers gets a list of unassigned peers that the indexer has previously retrieved advertisements from.

func (*Client) MarkAdProcessed added in v0.8.10

func (c *Client) MarkAdProcessed(ctx context.Context, providerID peer.ID, adCid cid.Cid) error

func (*Client) ReloadConfig

func (c *Client) ReloadConfig(ctx context.Context) error

ReloadConfig reloads reloadable parts of the configuration file.

func (*Client) SetLogLevels

func (c *Client) SetLogLevels(ctx context.Context, sysLvl map[string]string) error

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*model.Status, error)

func (*Client) Sync

func (c *Client) Sync(ctx context.Context, peerID peer.ID, peerAddr multiaddr.Multiaddr, depth int64, resync bool) error

Sync with a data peer up to the latest ID.

func (*Client) Unassign

func (c *Client) Unassign(ctx context.Context, peerID peer.ID) error

Unassign unassigns a publish from an indexer, when the indexer is configured to work with an assigner service.

type Option

type Option func(*config) error

Option is a function that sets a value in a config.

func WithClient

func WithClient(c *http.Client) Option

WithClient allows creation of the http client using an underlying network round tripper / client.

Jump to

Keyboard shortcuts

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