Documentation ¶
Index ¶
- Variables
- func Bool(v bool) (p *bool)
- type Addresses
- type BadRequestError
- type Bin
- type Client
- type ClientOptions
- type Health
- type NodeService
- func (n *NodeService) Addresses(ctx context.Context) (resp Addresses, err error)
- func (n *NodeService) HasChunk(ctx context.Context, a swarm.Address) (bool, error)
- func (n *NodeService) Health(ctx context.Context) (resp Health, err error)
- func (n *NodeService) Peers(ctx context.Context) (resp Peers, err error)
- func (n *NodeService) PinChunk(ctx context.Context, a swarm.Address) (bool, error)
- func (n *NodeService) PinnedChunk(ctx context.Context, a swarm.Address) (resp PinnedChunk, err error)
- func (n *NodeService) PinnedChunks(ctx context.Context) (resp PinnedChunks, err error)
- func (n *NodeService) Readiness(ctx context.Context) (resp Readiness, err error)
- func (n *NodeService) Topology(ctx context.Context) (resp Topology, err error)
- func (n *NodeService) UnpinChunk(ctx context.Context, a swarm.Address) (bool, error)
- type Peer
- type Peers
- type PingPongService
- type PinnedChunk
- type PinnedChunks
- type Pong
- type Readiness
- type Topology
Constants ¶
This section is empty.
Variables ¶
var ( ErrForbidden = errors.New("forbidden") ErrNotFound = errors.New("not found") ErrMethodNotAllowed = errors.New("method not allowed") ErrTooManyRequests = errors.New("too many requests") ErrInternalServerError = errors.New("internal server error") )
Errors that are returned by the API.
Functions ¶
Types ¶
type Addresses ¶
type Addresses struct { Overlay swarm.Address `json:"overlay"` Underlay []string `json:"underlay"` }
Addresses represents node's addresses
type BadRequestError ¶
type BadRequestError struct {
// contains filtered or unexported fields
}
BadRequestError holds list of errors from http response that represent invalid data submitted by the user.
func NewBadRequestError ¶
func NewBadRequestError(errors ...string) (err *BadRequestError)
NewBadRequestError constructs a new BadRequestError with provided errors.
func (*BadRequestError) Error ¶
func (e *BadRequestError) Error() (s string)
func (*BadRequestError) Errors ¶
func (e *BadRequestError) Errors() (errs []string)
Errors returns a list of error messages.
type Bin ¶ added in v0.2.2
type Bin struct { Population int `json:"population"` Connected int `json:"connected"` DisconnectedPeers []swarm.Address `json:"disconnectedPeers"` ConnectedPeers []swarm.Address `json:"connectedPeers"` }
Bin represents Kademlia bin
type Client ¶
type Client struct { // Services that API provides. Node *NodeService PingPong *PingPongService // contains filtered or unexported fields }
Client manages communication with the Bee Debug API.
type ClientOptions ¶
ClientOptions holds optional parameters for the Client.
type Health ¶ added in v0.2.3
type Health struct {
Status string `json:"status"`
}
Health represents node's health
type NodeService ¶
type NodeService service
NodeService represents Bee's Node service
func (*NodeService) Addresses ¶
func (n *NodeService) Addresses(ctx context.Context) (resp Addresses, err error)
Addresses returns node's addresses
func (*NodeService) Health ¶ added in v0.2.3
func (n *NodeService) Health(ctx context.Context) (resp Health, err error)
Health returns node's health
func (*NodeService) Peers ¶
func (n *NodeService) Peers(ctx context.Context) (resp Peers, err error)
Peers returns node's peers
func (*NodeService) PinnedChunk ¶ added in v0.2.12
func (n *NodeService) PinnedChunk(ctx context.Context, a swarm.Address) (resp PinnedChunk, err error)
PinnedChunk gets pinned chunk
func (*NodeService) PinnedChunks ¶ added in v0.2.12
func (n *NodeService) PinnedChunks(ctx context.Context) (resp PinnedChunks, err error)
PinnedChunks gets pinned chunks
func (*NodeService) Readiness ¶ added in v0.2.3
func (n *NodeService) Readiness(ctx context.Context) (resp Readiness, err error)
Readiness returns node's readiness
func (*NodeService) Topology ¶ added in v0.2.2
func (n *NodeService) Topology(ctx context.Context) (resp Topology, err error)
Topology returns Kademlia topology
func (*NodeService) UnpinChunk ¶ added in v0.2.12
UnpinChunk unpins chunk
type PingPongService ¶ added in v0.2.9
type PingPongService service
PingPongService represents Bee's PingPong service
type PinnedChunk ¶ added in v0.2.12
type PinnedChunk struct { Address swarm.Address `json:"address"` PinCounter int `json:"pinCounter"` }
PinnedChunk represents pinned chunk
type PinnedChunks ¶ added in v0.2.12
type PinnedChunks struct {
Chunks []PinnedChunk `json:"chunks"`
}
PinnedChunks represents pinned chunks
type Pong ¶ added in v0.2.9
type Pong struct {
RTT string `json:"rtt"`
}
Pong represents Ping's response
type Readiness ¶ added in v0.2.3
type Readiness struct {
Status string `json:"status"`
}
Readiness represents node's readiness
type Topology ¶ added in v0.2.2
type Topology struct { BaseAddr swarm.Address `json:"baseAddr"` Population int `json:"population"` Connected int `json:"connected"` Timestamp time.Time `json:"timestamp"` NnLowWatermark int `json:"nnLowWatermark"` Depth int `json:"depth"` Bins map[string]Bin `json:"bins"` }
Topology represents Kademlia topology