client

package
v0.1.41 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 provides the client api.

func NewClient

func NewClient(target string, opts ...grpc.DialOption) (*Client, error)

NewClient starts the client.

func (*Client) AddRecord

func (c *Client) AddRecord(ctx context.Context, id thread.ID, lid peer.ID, rec core.Record, opts ...core.ThreadOption) error

func (*Client) AddReplicator

func (c *Client) AddReplicator(ctx context.Context, id thread.ID, paddr ma.Multiaddr, opts ...core.ThreadOption) (pid peer.ID, err error)

func (*Client) AddThread

func (c *Client) AddThread(ctx context.Context, addr ma.Multiaddr, opts ...core.NewThreadOption) (info thread.Info, err error)

func (*Client) Close

func (c *Client) Close() error

Close closes the client's grpc connection and cancels any active requests.

func (*Client) CreateRecord

func (c *Client) CreateRecord(ctx context.Context, id thread.ID, body format.Node, opts ...core.ThreadOption) (core.ThreadRecord, error)

func (*Client) CreateThread

func (c *Client) CreateThread(ctx context.Context, id thread.ID, opts ...core.NewThreadOption) (info thread.Info, err error)

func (*Client) DeleteThread

func (c *Client) DeleteThread(ctx context.Context, id thread.ID, opts ...core.ThreadOption) error

func (*Client) GetHostID

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

func (*Client) GetPbLogs added in v0.1.37

func (c *Client) GetPbLogs(ctx context.Context, id thread.ID) ([]*netpb.Log, thread.Info, error)

func (*Client) GetRecord

func (c *Client) GetRecord(ctx context.Context, id thread.ID, rid cid.Cid, opts ...core.ThreadOption) (core.Record, error)

func (*Client) GetThread

func (c *Client) GetThread(ctx context.Context, id thread.ID, opts ...core.ThreadOption) (info thread.Info, err error)

func (*Client) GetToken

func (c *Client) GetToken(ctx context.Context, identity thread.Identity) (tok thread.Token, err error)

func (*Client) PreLoadLogs added in v0.1.37

func (c *Client) PreLoadLogs(tid thread.ID, logs []netpb.Log) error

func (*Client) PullThread

func (c *Client) PullThread(ctx context.Context, id thread.ID, opts ...core.ThreadOption) error

func (*Client) Subscribe

func (c *Client) Subscribe(ctx context.Context, opts ...core.SubOption) (<-chan core.ThreadRecord, error)

Jump to

Keyboard shortcuts

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