Documentation ¶
Overview ¶
Package gatewayadmin - contains the gatewayadmin code.
Index ¶
- type FilecoinRetrievalGatewayAdmin
- func (a *FilecoinRetrievalGatewayAdmin) BlockPeer(targetID string, peerID string) (bool, string, error)
- func (a *FilecoinRetrievalGatewayAdmin) CacheOfferByDigest(targetID string, digest string, cid string) (bool, string, error)
- func (a *FilecoinRetrievalGatewayAdmin) ForceSync(targetID string) error
- func (a *FilecoinRetrievalGatewayAdmin) GetOfferByCID(targetID string, cid string) ([]string, []string, []string, []int64, []uint64, error)
- func (a *FilecoinRetrievalGatewayAdmin) InitialiseGateway(adminURL string, adminKey string, p2pPort int, gatewayIP string, ...) error
- func (a *FilecoinRetrievalGatewayAdmin) InspectPeer(targetID string, peerID string) (int64, bool, bool, []string, error)
- func (a *FilecoinRetrievalGatewayAdmin) ListCIDFrequency(targetID string, page uint) ([]string, []int, error)
- func (a *FilecoinRetrievalGatewayAdmin) ListGateways() ([]string, []string, []string)
- func (a *FilecoinRetrievalGatewayAdmin) ListPeers(targetID string) ([]string, []int64, []bool, []bool, []string, error)
- func (a *FilecoinRetrievalGatewayAdmin) ResumePeer(targetID string, peerID string) (bool, string, error)
- func (a *FilecoinRetrievalGatewayAdmin) UnblockPeer(targetID string, peerID string) (bool, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilecoinRetrievalGatewayAdmin ¶
type FilecoinRetrievalGatewayAdmin struct {
// contains filtered or unexported fields
}
FilecoinRetrievalGatewayAdmin is an example implementation using the api, which holds information about the interaction of the Filecoin Retrieval Gateway Admin with Filecoin Retrieval Gateways.
func NewFilecoinRetrievalGatewayAdmin ¶
func NewFilecoinRetrievalGatewayAdmin() *FilecoinRetrievalGatewayAdmin
NewFilecoinRetrievalGatewayAdmin initialises the Filecoin Retrieval Gateway Admin.
func (*FilecoinRetrievalGatewayAdmin) BlockPeer ¶
func (a *FilecoinRetrievalGatewayAdmin) BlockPeer(targetID string, peerID string) ( bool, string, error, )
BlockPeer blocks a given peer from a managed gateway
func (*FilecoinRetrievalGatewayAdmin) CacheOfferByDigest ¶
func (a *FilecoinRetrievalGatewayAdmin) CacheOfferByDigest(targetID string, digest string, cid string) ( bool, string, error, )
CacheOfferByDigest caches an offer by given digest, given cid by a managed gateway
func (*FilecoinRetrievalGatewayAdmin) ForceSync ¶
func (a *FilecoinRetrievalGatewayAdmin) ForceSync(targetID string) error
ForceSync forces a given managed provider to sync
func (*FilecoinRetrievalGatewayAdmin) GetOfferByCID ¶
func (a *FilecoinRetrievalGatewayAdmin) GetOfferByCID(targetID string, cid string) ( []string, []string, []string, []int64, []uint64, error, )
GetOfferByCID gets offers containing given cid from a managed gateway
func (*FilecoinRetrievalGatewayAdmin) InitialiseGateway ¶
func (a *FilecoinRetrievalGatewayAdmin) InitialiseGateway( adminURL string, adminKey string, p2pPort int, gatewayIP string, rootPrivKey string, lotusAPIAddr string, lotusAuthToken string, registerPrivKey string, registerAPIAddr string, registerAuthToken string, regionCode string, alias string, ) error
InitialiseGateway initialises given gateway.
func (*FilecoinRetrievalGatewayAdmin) InspectPeer ¶
func (a *FilecoinRetrievalGatewayAdmin) InspectPeer(targetID string, peerID string) ( int64, bool, bool, []string, error, )
InspectGateway inspects a given peer from a managed gateway
func (*FilecoinRetrievalGatewayAdmin) ListCIDFrequency ¶
func (a *FilecoinRetrievalGatewayAdmin) ListCIDFrequency(targetID string, page uint) ( []string, []int, error, )
ListCIDFrequency lists the cid frequency from a managed gateway
func (*FilecoinRetrievalGatewayAdmin) ListGateways ¶
func (a *FilecoinRetrievalGatewayAdmin) ListGateways() ( []string, []string, []string, )
ListGateways lists the list of active gateways. It returns a slice of gateway ids and a corresponding slice of region code and alias.
func (*FilecoinRetrievalGatewayAdmin) ListPeers ¶
func (a *FilecoinRetrievalGatewayAdmin) ListPeers(targetID string) ( []string, []int64, []bool, []bool, []string, error, )
ListPeers lists all the peers a given gateway is having a business relationship with.
func (*FilecoinRetrievalGatewayAdmin) ResumePeer ¶
func (a *FilecoinRetrievalGatewayAdmin) ResumePeer(targetID string, peerID string) ( bool, string, error, )
ResumePeer resumes a given peer from a managed gateway
func (*FilecoinRetrievalGatewayAdmin) UnblockPeer ¶
func (a *FilecoinRetrievalGatewayAdmin) UnblockPeer(targetID string, peerID string) ( bool, string, error, )
UnblockPeer unblocks a given peer gateway from a managed gateway