clawhub

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package clawhub implements the ClawHub registry adapter.

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 implements the ClawHub registry source.

func NewClient

func NewClient(baseURL string, opts ...Option) *Client

NewClient constructs a ClawHub registry client.

func (*Client) Capabilities

func (c *Client) Capabilities() registry.SourceCaps

Capabilities reports which registry operations ClawHub supports.

func (*Client) Close

func (c *Client) Close() error

Close releases any idle HTTP connections held by the client.

func (*Client) Download

func (c *Client) Download(
	ctx context.Context,
	slug string,
	opts registry.DownloadOpts,
) (*registry.DownloadResult, error)

Download fetches the archived skill package stream for one skill slug.

func (*Client) Info

func (c *Client) Info(ctx context.Context, slug string) (*registry.Detail, error)

Info fetches the full metadata for one skill slug.

func (*Client) Name

func (c *Client) Name() string

Name reports the registry source name.

func (*Client) Search

func (c *Client) Search(ctx context.Context, query string, opts registry.SearchOpts) ([]registry.Listing, error)

Search queries ClawHub for skill listings.

type Option

type Option func(*Client)

Option customizes a ClawHub client.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient overrides the underlying HTTP client.

func WithRetryPolicy

func WithRetryPolicy(initial, maxDelay time.Duration, retries int) Option

WithRetryPolicy overrides the retry policy used for retryable responses.

func WithSleep

func WithSleep(sleep func(context.Context, time.Duration) error) Option

WithSleep overrides the retry sleep function.

Jump to

Keyboard shortcuts

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