ipfscluster

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TrackerStatusUndefined            = "undefined"
	TrackerStatusClusterError         = "cluster_error"
	TrackerStatusPinError             = "pin_error"
	TrackerStatusUnpinError           = "unpin_error"
	TrackerStatusError                = "error"
	TrackerStatusPinned               = "pinned"
	TrackerStatusPinning              = "pinning"
	TrackerStatusUnpinning            = "unpinning"
	TrackerStatusUnpinned             = "unpinned"
	TrackerStatusRemote               = "remote"
	TrackerStatusPinQueued            = "pin_queued"
	TrackerStatusUnpinQueued          = "unpin_queued"
	TrackerStatusQueued               = "queued"
	TrackerStatusSharded              = "sharded"
	TrackerStatusUnexpectedlyUnpinned = "unexpectedly_unpinned"
)
View Source
const (
	MAX_REQUEST_BODY_SIZE = 1024 * 1024 * 99 // 99 MiB
)

Variables

View Source
var ErrRequestBodyLimit = errors.New("body size max limit 99MiB")

Functions

func NewClient

func NewClient(name string, opts ...Option) (*client, error)

Types

type DeleteResponse200

type DeleteResponse200 struct {
	Name string `json:"name"`
	CID  string `json:"cid"`
}

type Option

type Option func(*clientConfig) error

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithMimes

func WithMimes(mimes ...string) Option

func WithToken

func WithToken(accessToken string) Option

type PeerPinStatus

type PeerPinStatus struct {
	PeerName     string `json:"peername"`
	Status       string `json:"status"`
	Timestamp    string `json:"timestamp"`
	Error        string `json:"error"`
	AttemptCount int    `json:"attempt_count"`
	PriorityPin  bool   `json:"priority_pin"`
}

type Response200

type Response200 struct {
	Name string `json:"name"`
	CID  string `json:"cid"`
	Size int64  `json:"size"`
}

type ResponseCar200

type ResponseCar200 struct {
	Name  string `json:"name"`
	CID   string `json:"cid"`
	Size  int64  `json:"size"`
	Bytes int64  `json:"bytes"` // chunk size
}

type ResponseCid200

type ResponseCid200 struct {
	Name string `json:"name"`
	CID  string `json:"cid"`
}

type StatusResponse200

type StatusResponse200 struct {
	CID         string                   `json:"cid"`
	Name        string                   `json:"name"`
	Allocations []string                 `json:"allocations"`
	PeerMap     map[string]PeerPinStatus `json:"peer_map"`
}

Jump to

Keyboard shortcuts

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