pb

package
v3.4.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: AGPL-3.0, MIT Imports: 29 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAdmin        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAdmin          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAdmin = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthFile        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFile          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFile = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNamesys        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNamesys          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNamesys = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthNode        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNode          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNode = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPubsub        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPubsub          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPubsub = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthReplication        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReplication          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReplication = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthStatus        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStatus          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStatus = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthUtil        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowUtil          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupUtil = fmt.Errorf("proto: unexpected end of group")
)
View Source
var APISTATUS_name = map[int32]string{
	0: "ONLINE",
	1: "PURGING",
	2: "DEGRADED_PERFORMANCE",
	3: "ERROR",
}
View Source
var APISTATUS_value = map[string]int32{
	"ONLINE":               0,
	"PURGING":              1,
	"DEGRADED_PERFORMANCE": 2,
	"ERROR":                3,
}
View Source
var BSREQOPTS_name = map[int32]string{
	0: "DEFAULT",
	1: "BS_FORCE",
}
View Source
var BSREQOPTS_value = map[string]int32{
	"DEFAULT":  0,
	"BS_FORCE": 1,
}
View Source
var BSREQTYPE_name = map[int32]string{
	0: "BS_DELETE",
	1: "BS_PUT",
	2: "BS_PUT_MANY",
	3: "BS_GET",
	4: "BS_GET_MANY",
	5: "BS_GET_ALL",
	6: "BS_GET_STATS",
	7: "BS_HAS",
	8: "BS_HASH_ON_READ_ENABLE",
	9: "BS_HASH_ON_READ_DISABLE",
}
View Source
var BSREQTYPE_value = map[string]int32{
	"BS_DELETE":               0,
	"BS_PUT":                  1,
	"BS_PUT_MANY":             2,
	"BS_GET":                  3,
	"BS_GET_MANY":             4,
	"BS_GET_ALL":              5,
	"BS_GET_STATS":            6,
	"BS_HAS":                  7,
	"BS_HASH_ON_READ_ENABLE":  8,
	"BS_HASH_ON_READ_DISABLE": 9,
}
View Source
var CONNMGMTREQTYPE_name = map[int32]string{
	0: "CM_CONNECT",
	1: "CM_DISCONNECT",
	2: "CM_STATUS",
	3: "CM_GET_PEERS",
}
View Source
var CONNMGMTREQTYPE_value = map[string]int32{
	"CM_CONNECT":    0,
	"CM_DISCONNECT": 1,
	"CM_STATUS":     2,
	"CM_GET_PEERS":  3,
}
View Source
var DAGREQTYPE_name = map[int32]string{
	0: "DAG_PUT",
	1: "DAG_GET",
	2: "DAG_NEW_NODE",
	3: "DAG_ADD_LINKS",
	4: "DAG_GET_LINKS",
	5: "DAG_STAT",
}
View Source
var DAGREQTYPE_value = map[string]int32{
	"DAG_PUT":       0,
	"DAG_GET":       1,
	"DAG_NEW_NODE":  2,
	"DAG_ADD_LINKS": 3,
	"DAG_GET_LINKS": 4,
	"DAG_STAT":      5,
}
View Source
var EXTRASREQTYPE_name = map[int32]string{
	0: "EX_ENABLE",
	1: "EX_DISABLE",
}
View Source
var EXTRASREQTYPE_value = map[string]int32{
	"EX_ENABLE":  0,
	"EX_DISABLE": 1,
}
View Source
var EXTRASTYPE_name = map[int32]string{
	0: "IDENTIFY",
	1: "PUBSUB",
	2: "DISCOVERY",
	3: "MDNS",
}
View Source
var EXTRASTYPE_value = map[string]int32{
	"IDENTIFY":  0,
	"PUBSUB":    1,
	"DISCOVERY": 2,
	"MDNS":      3,
}
View Source
var ErrConnectToSelf = errors.New("connection to self not allowed")

ErrConnectToSelf is returned by a connection provider if it attempts to connect to itself

View Source
var GCREQTYPE_name = map[int32]string{
	0: "GC_START",
	1: "GC_STOP",
	2: "GC_STATUS",
}
View Source
var GCREQTYPE_value = map[string]int32{
	"GC_START":  0,
	"GC_STOP":   1,
	"GC_STATUS": 2,
}
View Source
var KSREQTYPE_name = map[int32]string{
	0: "KS_HAS",
	1: "KS_GET",
	2: "KS_PUT",
	3: "KS_DELETE",
	4: "KS_LIST",
}
View Source
var KSREQTYPE_value = map[string]int32{
	"KS_HAS":    0,
	"KS_GET":    1,
	"KS_PUT":    2,
	"KS_DELETE": 3,
	"KS_LIST":   4,
}
View Source
var P2PREQTYPE_name = map[int32]string{
	0: "CLOSE",
	1: "FORWARD",
	2: "LISTEN",
	3: "LS",
}
View Source
var P2PREQTYPE_value = map[string]int32{
	"CLOSE":   0,
	"FORWARD": 1,
	"LISTEN":  2,
	"LS":      3,
}
View Source
var PSREQTYPE_name = map[int32]string{
	0: "PS_GET_TOPICS",
	1: "PS_LIST_PEERS",
	2: "PS_SUBSCRIBE",
	3: "PS_PUBLISH",
}
View Source
var PSREQTYPE_value = map[string]int32{
	"PS_GET_TOPICS": 0,
	"PS_LIST_PEERS": 1,
	"PS_SUBSCRIBE":  2,
	"PS_PUBLISH":    3,
}
View Source
var REFREQOPTS_name = map[int32]string{
	0: "REF_FORCE",
}
View Source
var REFREQOPTS_value = map[string]int32{
	"REF_FORCE": 0,
}
View Source
var REFREQTYPE_name = map[int32]string{
	0: "REF_GET_COUNT",
	1: "REF_DELETE",
}
View Source
var REFREQTYPE_value = map[string]int32{
	"REF_GET_COUNT": 0,
	"REF_DELETE":    1,
}

Functions

func NewReplicatorClientConstructor added in v3.2.0

func NewReplicatorClientConstructor(myPrivateKey libcryto.PrivKey, server *AddrInfo, addPeer func(id peer.ID, ma multiaddr.Multiaddr), logger *zap.Logger) (ReplicatorClient, Close, error)

NewReplicatorClientConstructor is a convenient way to make a NewReplicatorClient.

The underlying implementation of the returned ReplicatorClient may change in miner releases. To take better control of the ReplicatorClient, such as changing connection options, please construct it manually by copying the source code of this function, or implement the ReplicatorClient interface.

func RegisterAdminAPIServer

func RegisterAdminAPIServer(s *grpc.Server, srv AdminAPIServer)

func RegisterFileAPIServer

func RegisterFileAPIServer(s *grpc.Server, srv FileAPIServer)

func RegisterNameSysAPIServer

func RegisterNameSysAPIServer(s *grpc.Server, srv NameSysAPIServer)

func RegisterNodeAPIServer

func RegisterNodeAPIServer(s *grpc.Server, srv NodeAPIServer)

func RegisterPubSubAPIServer

func RegisterPubSubAPIServer(s *grpc.Server, srv PubSubAPIServer)

func RegisterReplicatorServer added in v3.1.0

func RegisterReplicatorServer(s *grpc.Server, srv ReplicatorServer)

func RegisterStatusAPIServer

func RegisterStatusAPIServer(s *grpc.Server, srv StatusAPIServer)

Types

type APISTATUS

type APISTATUS int32

APISTATUS is an enum to return a concise description of api status

const (
	// ONLINE indicates everything is working as expected
	APISTATUS_ONLINE APISTATUS = 0
	// PURGING indicates the system is undergoing data removal
	// a purging system is not available for use unless all other nodes are unavailable
	APISTATUS_PURGING APISTATUS = 1
	// DEGRADED_PERFORMANCE indicates the system is currently under heavy load
	APISTATUS_DEGRADED_PERFORMANCE APISTATUS = 2
	// ERROR indicates that the system is currently experiencing an error and should not be used
	APISTATUS_ERROR APISTATUS = 3
)

func (APISTATUS) EnumDescriptor

func (APISTATUS) EnumDescriptor() ([]byte, []int)

func (APISTATUS) String

func (x APISTATUS) String() string

type AddPeer added in v3.2.0

type AddPeer func(id peer.ID, ma multiaddr.Multiaddr)

AddPeer is a callback when a new peer should be added

type AddrInfo added in v3.1.0

type AddrInfo struct {
	// id_bytes is a libp2p peer identity. It is used to verity the Peer's public key.
	// Please use helper functions GetID and SetID for this field
	IdBytes []byte `protobuf:"bytes,1,opt,name=id_bytes,json=idBytes,proto3" json:"id_bytes,omitempty"`
	// addrBytes are bytes of Multiaddr for locating this peer.
	// Please use helper functions GetMultiAddrs, and SetMultiAddrs for this field.
	AddrsBytes [][]byte `protobuf:"bytes,2,rep,name=addrs_bytes,json=addrsBytes,proto3" json:"addrs_bytes,omitempty"`
	// grpc port for replication protocol. will be optional once grpc is integrated into multistream.
	GrpcPort             int32    `protobuf:"varint,3,opt,name=grpc_port,json=grpcPort,proto3" json:"grpc_port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

AddrInfo can be used to ID and locate a server (see also libp2p/go-libp2p-core/peer#AddrInfo)

func NewAddrInfoFromHost added in v3.1.0

func NewAddrInfoFromHost(h HostInfo, gport int32) (*AddrInfo, error)

NewAddrInfoFromHost creates an AddrInfo from a HostInfo

func ServerSourcesToAddrInfos added in v3.1.0

func ServerSourcesToAddrInfos(ss []*ServerSource) []*AddrInfo

ServerSourcesToAddrInfos returns AddrInfos from ServerSources TODO: unstable API

func (*AddrInfo) AddMultiAddr added in v3.1.0

func (a *AddrInfo) AddMultiAddr(m multiaddr.Multiaddr) error

AddMultiAddr add a Multiaddr to the end of addrs_bytes

func (*AddrInfo) Descriptor added in v3.1.0

func (*AddrInfo) Descriptor() ([]byte, []int)

func (*AddrInfo) GetAddrsBytes added in v3.1.0

func (m *AddrInfo) GetAddrsBytes() [][]byte

func (*AddrInfo) GetGrpcPort added in v3.1.0

func (m *AddrInfo) GetGrpcPort() int32

func (*AddrInfo) GetID added in v3.1.0

func (a *AddrInfo) GetID() (peer.ID, error)

GetID returns the libp2p PeerID of AddrInfo, unless an error is encountered during decoding.

func (*AddrInfo) GetIdBytes added in v3.1.0

func (m *AddrInfo) GetIdBytes() []byte

func (*AddrInfo) GetMultiAddrs added in v3.1.0

func (a *AddrInfo) GetMultiAddrs() ([]multiaddr.Multiaddr, error)

GetMultiAddrs returns the location addresses of AddrInfo as a []Multiaddr. If Multiaddr contains an ID part, it must match ID in AddrInfo. If any errors are encountered during decoding, the first error is returned, and the returned Multiaddr will only contain good addresses.

func (*AddrInfo) Marshal added in v3.1.0

func (m *AddrInfo) Marshal() (dAtA []byte, err error)

func (*AddrInfo) MarshalTo added in v3.1.0

func (m *AddrInfo) MarshalTo(dAtA []byte) (int, error)

func (*AddrInfo) MarshalToSizedBuffer added in v3.1.0

func (m *AddrInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AddrInfo) ProtoMessage added in v3.1.0

func (*AddrInfo) ProtoMessage()

func (*AddrInfo) Reset added in v3.1.0

func (m *AddrInfo) Reset()

func (*AddrInfo) SetID added in v3.1.0

func (a *AddrInfo) SetID(id peer.ID)

SetID sets the id_bytes field from libp2p PeerID

func (*AddrInfo) Size added in v3.1.0

func (m *AddrInfo) Size() (n int)

func (*AddrInfo) String added in v3.1.0

func (m *AddrInfo) String() string

func (*AddrInfo) Unmarshal added in v3.1.0

func (m *AddrInfo) Unmarshal(dAtA []byte) error

func (*AddrInfo) XXX_DiscardUnknown added in v3.1.0

func (m *AddrInfo) XXX_DiscardUnknown()

func (*AddrInfo) XXX_Marshal added in v3.1.0

func (m *AddrInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddrInfo) XXX_Merge added in v3.1.0

func (m *AddrInfo) XXX_Merge(src proto.Message)

func (*AddrInfo) XXX_Size added in v3.1.0

func (m *AddrInfo) XXX_Size() int

func (*AddrInfo) XXX_Unmarshal added in v3.1.0

func (m *AddrInfo) XXX_Unmarshal(b []byte) error

type AdminAPIClient

type AdminAPIClient interface {
	// ManageGC is used to manage TemporalX's garbage collection process
	ManageGC(ctx context.Context, in *ManageGCRequest, opts ...grpc.CallOption) (*ManageGCResponse, error)
	// RefCount is used to analyze the counter store and pull reference count information
	RefCount(ctx context.Context, in *RefCountRequest, opts ...grpc.CallOption) (*RefCountResponse, error)
}

AdminAPIClient is the client API for AdminAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAdminAPIClient

func NewAdminAPIClient(cc *grpc.ClientConn) AdminAPIClient

type AdminAPIServer

type AdminAPIServer interface {
	// ManageGC is used to manage TemporalX's garbage collection process
	ManageGC(context.Context, *ManageGCRequest) (*ManageGCResponse, error)
	// RefCount is used to analyze the counter store and pull reference count information
	RefCount(context.Context, *RefCountRequest) (*RefCountResponse, error)
}

AdminAPIServer is the server API for AdminAPI service.

type BSREQOPTS

type BSREQOPTS int32

BSREQOPTS are options for blockstore requests

const (
	// DEFAULT indicates to use the default settings
	BSREQOPTS_DEFAULT BSREQOPTS = 0
	// BS_FORCE indicates to force the request regardless of any possible issues
	BSREQOPTS_BS_FORCE BSREQOPTS = 1
)

func (BSREQOPTS) EnumDescriptor

func (BSREQOPTS) EnumDescriptor() ([]byte, []int)

func (BSREQOPTS) String

func (x BSREQOPTS) String() string

type BSREQTYPE

type BSREQTYPE int32

BSREQTYPE is a particular blockstore request type

const (
	// BS_DELETE is used to delete a block from the store
	BSREQTYPE_BS_DELETE BSREQTYPE = 0
	// BS_PUT is used to put a single block in the store
	BSREQTYPE_BS_PUT BSREQTYPE = 1
	// BS_PUT_MANY is used to put many blocks in the store
	BSREQTYPE_BS_PUT_MANY BSREQTYPE = 2
	// BS_GET is used to get a block from the store
	BSREQTYPE_BS_GET BSREQTYPE = 3
	// BS_GET_MANY is used to get many blocks from the store
	BSREQTYPE_BS_GET_MANY BSREQTYPE = 4
	// BS_GET_ALL is used to retrieve all blocks from the store
	// It is the gRPC equivalent of Blockstore::AllKeysChan
	BSREQTYPE_BS_GET_ALL BSREQTYPE = 5
	// BS_GET_STATS is used to retrieve statistics about individual blocks
	BSREQTYPE_BS_GET_STATS BSREQTYPE = 6
	// BS_HAS is used to retrieve whether or not we have the block
	BSREQTYPE_BS_HAS BSREQTYPE = 7
	// BS_HASH_ON_READ_ENABLE is used to enable hash on read
	BSREQTYPE_BS_HASH_ON_READ_ENABLE BSREQTYPE = 8
	// BS_HASH_ON_READ_DISABLE is used to disable hash on read
	BSREQTYPE_BS_HASH_ON_READ_DISABLE BSREQTYPE = 9
)

func (BSREQTYPE) EnumDescriptor

func (BSREQTYPE) EnumDescriptor() ([]byte, []int)

func (BSREQTYPE) String

func (x BSREQTYPE) String() string

type Blob

type Blob struct {
	// content is the actual binary data contained in this message
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// Range start and end mirrors developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range.
	// If both is zero, the blobs streams contents of the file from start to finish.
	// The unit of range is alway in bytes.
	// Currently, DownloadResponse support blob range.
	RangeStart uint64 `protobuf:"varint,2,opt,name=rangeStart,proto3" json:"rangeStart,omitempty"`
	RangeEnd   uint64 `protobuf:"varint,3,opt,name=rangeEnd,proto3" json:"rangeEnd,omitempty"`
}

Blob is a chunk of binary data

func (*Blob) Descriptor

func (*Blob) Descriptor() ([]byte, []int)

func (*Blob) GetContent

func (m *Blob) GetContent() []byte

func (*Blob) GetRangeEnd added in v3.1.1

func (m *Blob) GetRangeEnd() uint64

func (*Blob) GetRangeStart added in v3.1.1

func (m *Blob) GetRangeStart() uint64

func (*Blob) Marshal

func (m *Blob) Marshal() (dAtA []byte, err error)

func (*Blob) MarshalTo

func (m *Blob) MarshalTo(dAtA []byte) (int, error)

func (*Blob) MarshalToSizedBuffer

func (m *Blob) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Blob) ProtoMessage

func (*Blob) ProtoMessage()

func (*Blob) Reset

func (m *Blob) Reset()

func (*Blob) Size

func (m *Blob) Size() (n int)

func (*Blob) String

func (m *Blob) String() string

func (*Blob) Unmarshal

func (m *Blob) Unmarshal(dAtA []byte) error

func (*Blob) XXX_DiscardUnknown

func (m *Blob) XXX_DiscardUnknown()

func (*Blob) XXX_Marshal

func (m *Blob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Blob) XXX_Merge

func (m *Blob) XXX_Merge(src proto.Message)

func (*Blob) XXX_Size

func (m *Blob) XXX_Size() int

func (*Blob) XXX_Unmarshal

func (m *Blob) XXX_Unmarshal(b []byte) error

type Block

type Block struct {
	// cid is the identifier of the block
	Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"`
	// data is the actual contents of the block
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// size of the block, only filled out by BS_GET_STATS
	// since if we just want stats, we dont want to
	// retrieve all the data.
	Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
}

func (*Block) Descriptor

func (*Block) Descriptor() ([]byte, []int)

func (*Block) GetCid

func (m *Block) GetCid() string

func (*Block) GetData

func (m *Block) GetData() []byte

func (*Block) GetSize_ added in v3.2.1

func (m *Block) GetSize_() int64

func (*Block) Marshal

func (m *Block) Marshal() (dAtA []byte, err error)

func (*Block) MarshalTo

func (m *Block) MarshalTo(dAtA []byte) (int, error)

func (*Block) MarshalToSizedBuffer

func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) Size

func (m *Block) Size() (n int)

func (*Block) String

func (m *Block) String() string

func (*Block) Unmarshal

func (m *Block) Unmarshal(dAtA []byte) error

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Block) XXX_Merge

func (m *Block) XXX_Merge(src proto.Message)

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

func (m *Block) XXX_Unmarshal(b []byte) error

type BlockstoreRequest

type BlockstoreRequest struct {
	//  indicates the particular request type being made
	RequestType BSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.BSREQTYPE" json:"requestType,omitempty"`
	// optional request settings
	ReqOpts []BSREQOPTS `protobuf:"varint,2,rep,packed,name=reqOpts,proto3,enum=pb.BSREQOPTS" json:"reqOpts,omitempty"`
	// cids of blocks
	// sent by: BS_DELETE, BS_GET, BS_GET_MANY, BS_GET_STATS
	Cids []string `protobuf:"bytes,3,rep,name=cids,proto3" json:"cids,omitempty"`
	// the data we are putting
	// sent by: BS_PUT, BS_PUT_MANY
	Data [][]byte `protobuf:"bytes,4,rep,name=data,proto3" json:"data,omitempty"`
	// the cid version to use when constructing blocks, default is v1
	// sent by: BS_PUT, BS_PUT_MANY
	CidVersion string `protobuf:"bytes,5,opt,name=cidVersion,proto3" json:"cidVersion,omitempty"`
	// the hash function to use when constructing blocks, default is sha2-256
	// sent by: BS_PUT, BS_PUT_MANY
	HashFunc string `protobuf:"bytes,7,opt,name=hashFunc,proto3" json:"hashFunc,omitempty"`
}

BlockstoreRequest is a message used to control blockstores

func (*BlockstoreRequest) Descriptor

func (*BlockstoreRequest) Descriptor() ([]byte, []int)

func (*BlockstoreRequest) GetCidVersion

func (m *BlockstoreRequest) GetCidVersion() string

func (*BlockstoreRequest) GetCids

func (m *BlockstoreRequest) GetCids() []string

func (*BlockstoreRequest) GetData

func (m *BlockstoreRequest) GetData() [][]byte

func (*BlockstoreRequest) GetHashFunc

func (m *BlockstoreRequest) GetHashFunc() string

func (*BlockstoreRequest) GetReqOpts

func (m *BlockstoreRequest) GetReqOpts() []BSREQOPTS

func (*BlockstoreRequest) GetRequestType

func (m *BlockstoreRequest) GetRequestType() BSREQTYPE

func (*BlockstoreRequest) Marshal

func (m *BlockstoreRequest) Marshal() (dAtA []byte, err error)

func (*BlockstoreRequest) MarshalTo

func (m *BlockstoreRequest) MarshalTo(dAtA []byte) (int, error)

func (*BlockstoreRequest) MarshalToSizedBuffer

func (m *BlockstoreRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BlockstoreRequest) ProtoMessage

func (*BlockstoreRequest) ProtoMessage()

func (*BlockstoreRequest) Reset

func (m *BlockstoreRequest) Reset()

func (*BlockstoreRequest) Size

func (m *BlockstoreRequest) Size() (n int)

func (*BlockstoreRequest) String

func (m *BlockstoreRequest) String() string

func (*BlockstoreRequest) Unmarshal

func (m *BlockstoreRequest) Unmarshal(dAtA []byte) error

func (*BlockstoreRequest) XXX_DiscardUnknown

func (m *BlockstoreRequest) XXX_DiscardUnknown()

func (*BlockstoreRequest) XXX_Marshal

func (m *BlockstoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockstoreRequest) XXX_Merge

func (m *BlockstoreRequest) XXX_Merge(src proto.Message)

func (*BlockstoreRequest) XXX_Size

func (m *BlockstoreRequest) XXX_Size() int

func (*BlockstoreRequest) XXX_Unmarshal

func (m *BlockstoreRequest) XXX_Unmarshal(b []byte) error

type BlockstoreResponse

type BlockstoreResponse struct {
	// indicates the particular request type being made
	RequestType BSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.BSREQTYPE" json:"requestType,omitempty"`
	// a copy of blocks from the blockstore
	// sent by: BS_PUT, BS_PUT_MANY, BS_GET, BS_GET_MANY, BS_GET_STATS, BS_GET_ALL
	//
	// in the case of BS_PUT, and BS_PUT_MANY requests
	// the data field will be empty as this is only populated
	// by get requests
	//
	// in the case of BS_GET_STATS only the cid, and size params
	// will be filled out, since we are just interested in the size
	Blocks []*Block `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"`
}

BlockstoreResponse is a response to a BlockstoreqRequest

func (*BlockstoreResponse) Descriptor

func (*BlockstoreResponse) Descriptor() ([]byte, []int)

func (*BlockstoreResponse) GetBlocks

func (m *BlockstoreResponse) GetBlocks() []*Block

func (*BlockstoreResponse) GetRequestType

func (m *BlockstoreResponse) GetRequestType() BSREQTYPE

func (*BlockstoreResponse) Marshal

func (m *BlockstoreResponse) Marshal() (dAtA []byte, err error)

func (*BlockstoreResponse) MarshalTo

func (m *BlockstoreResponse) MarshalTo(dAtA []byte) (int, error)

func (*BlockstoreResponse) MarshalToSizedBuffer

func (m *BlockstoreResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BlockstoreResponse) ProtoMessage

func (*BlockstoreResponse) ProtoMessage()

func (*BlockstoreResponse) Reset

func (m *BlockstoreResponse) Reset()

func (*BlockstoreResponse) Size

func (m *BlockstoreResponse) Size() (n int)

func (*BlockstoreResponse) String

func (m *BlockstoreResponse) String() string

func (*BlockstoreResponse) Unmarshal

func (m *BlockstoreResponse) Unmarshal(dAtA []byte) error

func (*BlockstoreResponse) XXX_DiscardUnknown

func (m *BlockstoreResponse) XXX_DiscardUnknown()

func (*BlockstoreResponse) XXX_Marshal

func (m *BlockstoreResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockstoreResponse) XXX_Merge

func (m *BlockstoreResponse) XXX_Merge(src proto.Message)

func (*BlockstoreResponse) XXX_Size

func (m *BlockstoreResponse) XXX_Size() int

func (*BlockstoreResponse) XXX_Unmarshal

func (m *BlockstoreResponse) XXX_Unmarshal(b []byte) error

type CONNMGMTREQTYPE

type CONNMGMTREQTYPE int32

CONNMGMTREQTYPE indicates the particular ConnMgmt request being performed

const (
	// CM_CONNECT is used to connect to a libp2p peer
	CONNMGMTREQTYPE_CM_CONNECT CONNMGMTREQTYPE = 0
	// CM_DISCONNECT is used to disconnect from a libp2p peer
	CONNMGMTREQTYPE_CM_DISCONNECT CONNMGMTREQTYPE = 1
	// CM_STATUS is used to return status information about libp2p peer connections
	// useful for determining whether or not we are connected to someone
	CONNMGMTREQTYPE_CM_STATUS CONNMGMTREQTYPE = 2
	//CM_GET_PEERS is used to return all known peers
	CONNMGMTREQTYPE_CM_GET_PEERS CONNMGMTREQTYPE = 3
)

func (CONNMGMTREQTYPE) EnumDescriptor

func (CONNMGMTREQTYPE) EnumDescriptor() ([]byte, []int)

func (CONNMGMTREQTYPE) String

func (x CONNMGMTREQTYPE) String() string

type Close added in v3.2.0

type Close func() error

Close is a function that closes a resource

type ConnMgmtRequest

type ConnMgmtRequest struct {
	// indicates the particular connection management request being performed
	RequestType CONNMGMTREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.CONNMGMTREQTYPE" json:"requestType,omitempty"`
	// a list of multiaddrs
	// sent by: CM_CONNECT
	MultiAddrs []string `protobuf:"bytes,2,rep,name=multiAddrs,proto3" json:"multiAddrs,omitempty"`
	// a list of peer IDs
	// sent by: CM_DISCONNECT, CM_STATUS, CM_GET_PEERS
	PeerIDs []string `protobuf:"bytes,3,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"`
}

func (*ConnMgmtRequest) Descriptor

func (*ConnMgmtRequest) Descriptor() ([]byte, []int)

func (*ConnMgmtRequest) GetMultiAddrs

func (m *ConnMgmtRequest) GetMultiAddrs() []string

func (*ConnMgmtRequest) GetPeerIDs

func (m *ConnMgmtRequest) GetPeerIDs() []string

func (*ConnMgmtRequest) GetRequestType

func (m *ConnMgmtRequest) GetRequestType() CONNMGMTREQTYPE

func (*ConnMgmtRequest) Marshal

func (m *ConnMgmtRequest) Marshal() (dAtA []byte, err error)

func (*ConnMgmtRequest) MarshalTo

func (m *ConnMgmtRequest) MarshalTo(dAtA []byte) (int, error)

func (*ConnMgmtRequest) MarshalToSizedBuffer

func (m *ConnMgmtRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnMgmtRequest) ProtoMessage

func (*ConnMgmtRequest) ProtoMessage()

func (*ConnMgmtRequest) Reset

func (m *ConnMgmtRequest) Reset()

func (*ConnMgmtRequest) Size

func (m *ConnMgmtRequest) Size() (n int)

func (*ConnMgmtRequest) String

func (m *ConnMgmtRequest) String() string

func (*ConnMgmtRequest) Unmarshal

func (m *ConnMgmtRequest) Unmarshal(dAtA []byte) error

func (*ConnMgmtRequest) XXX_DiscardUnknown

func (m *ConnMgmtRequest) XXX_DiscardUnknown()

func (*ConnMgmtRequest) XXX_Marshal

func (m *ConnMgmtRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnMgmtRequest) XXX_Merge

func (m *ConnMgmtRequest) XXX_Merge(src proto.Message)

func (*ConnMgmtRequest) XXX_Size

func (m *ConnMgmtRequest) XXX_Size() int

func (*ConnMgmtRequest) XXX_Unmarshal

func (m *ConnMgmtRequest) XXX_Unmarshal(b []byte) error

type ConnMgmtResponse

type ConnMgmtResponse struct {
	// indicates the particular connection management request being performed
	RequestType CONNMGMTREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.CONNMGMTREQTYPE" json:"requestType,omitempty"`
	Connected   map[string]bool `` /* 160-byte string literal not displayed */
	// a map of the peer id, and a custom message indicating success, or why there was a failure
	Status  map[string]*ConnMgmtStatus `` /* 153-byte string literal not displayed */
	PeerIDs []string                   `protobuf:"bytes,4,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"`
}

func (*ConnMgmtResponse) Descriptor

func (*ConnMgmtResponse) Descriptor() ([]byte, []int)

func (*ConnMgmtResponse) GetConnected

func (m *ConnMgmtResponse) GetConnected() map[string]bool

func (*ConnMgmtResponse) GetPeerIDs

func (m *ConnMgmtResponse) GetPeerIDs() []string

func (*ConnMgmtResponse) GetRequestType

func (m *ConnMgmtResponse) GetRequestType() CONNMGMTREQTYPE

func (*ConnMgmtResponse) GetStatus

func (m *ConnMgmtResponse) GetStatus() map[string]*ConnMgmtStatus

func (*ConnMgmtResponse) Marshal

func (m *ConnMgmtResponse) Marshal() (dAtA []byte, err error)

func (*ConnMgmtResponse) MarshalTo

func (m *ConnMgmtResponse) MarshalTo(dAtA []byte) (int, error)

func (*ConnMgmtResponse) MarshalToSizedBuffer

func (m *ConnMgmtResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnMgmtResponse) ProtoMessage

func (*ConnMgmtResponse) ProtoMessage()

func (*ConnMgmtResponse) Reset

func (m *ConnMgmtResponse) Reset()

func (*ConnMgmtResponse) Size

func (m *ConnMgmtResponse) Size() (n int)

func (*ConnMgmtResponse) String

func (m *ConnMgmtResponse) String() string

func (*ConnMgmtResponse) Unmarshal

func (m *ConnMgmtResponse) Unmarshal(dAtA []byte) error

func (*ConnMgmtResponse) XXX_DiscardUnknown

func (m *ConnMgmtResponse) XXX_DiscardUnknown()

func (*ConnMgmtResponse) XXX_Marshal

func (m *ConnMgmtResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnMgmtResponse) XXX_Merge

func (m *ConnMgmtResponse) XXX_Merge(src proto.Message)

func (*ConnMgmtResponse) XXX_Size

func (m *ConnMgmtResponse) XXX_Size() int

func (*ConnMgmtResponse) XXX_Unmarshal

func (m *ConnMgmtResponse) XXX_Unmarshal(b []byte) error

type ConnMgmtStatus

type ConnMgmtStatus struct {
	// indicate whether or not we actually disconnected
	Disconnected bool `protobuf:"varint,1,opt,name=disconnected,proto3" json:"disconnected,omitempty"`
	// if disconnected is false, the reason why it is false
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
}

Contains status information about a particular disconnect attempt

func (*ConnMgmtStatus) Descriptor

func (*ConnMgmtStatus) Descriptor() ([]byte, []int)

func (*ConnMgmtStatus) GetDisconnected

func (m *ConnMgmtStatus) GetDisconnected() bool

func (*ConnMgmtStatus) GetReason

func (m *ConnMgmtStatus) GetReason() string

func (*ConnMgmtStatus) Marshal

func (m *ConnMgmtStatus) Marshal() (dAtA []byte, err error)

func (*ConnMgmtStatus) MarshalTo

func (m *ConnMgmtStatus) MarshalTo(dAtA []byte) (int, error)

func (*ConnMgmtStatus) MarshalToSizedBuffer

func (m *ConnMgmtStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConnMgmtStatus) ProtoMessage

func (*ConnMgmtStatus) ProtoMessage()

func (*ConnMgmtStatus) Reset

func (m *ConnMgmtStatus) Reset()

func (*ConnMgmtStatus) Size

func (m *ConnMgmtStatus) Size() (n int)

func (*ConnMgmtStatus) String

func (m *ConnMgmtStatus) String() string

func (*ConnMgmtStatus) Unmarshal

func (m *ConnMgmtStatus) Unmarshal(dAtA []byte) error

func (*ConnMgmtStatus) XXX_DiscardUnknown

func (m *ConnMgmtStatus) XXX_DiscardUnknown()

func (*ConnMgmtStatus) XXX_Marshal

func (m *ConnMgmtStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConnMgmtStatus) XXX_Merge

func (m *ConnMgmtStatus) XXX_Merge(src proto.Message)

func (*ConnMgmtStatus) XXX_Size

func (m *ConnMgmtStatus) XXX_Size() int

func (*ConnMgmtStatus) XXX_Unmarshal

func (m *ConnMgmtStatus) XXX_Unmarshal(b []byte) error

type DAGREQTYPE

type DAGREQTYPE int32

DAGREQTYPE indicates the particular DagAPI request being performed

const (
	// DAG_PUT is used to add new IPLD objects
	DAGREQTYPE_DAG_PUT DAGREQTYPE = 0
	// DAG_GET is used to retrieve IPLD object data
	DAGREQTYPE_DAG_GET DAGREQTYPE = 1
	// DAG_NEW_NODE is used to create a new IPLD node object
	DAGREQTYPE_DAG_NEW_NODE DAGREQTYPE = 2
	// DAG_ADD_LINKS is used to add links to an IPLD node object
	DAGREQTYPE_DAG_ADD_LINKS DAGREQTYPE = 3
	// DAG_GET_LINKS is used to retrieve all links contained in an IPLD node object
	DAGREQTYPE_DAG_GET_LINKS DAGREQTYPE = 4
	// DAG_STAT is used to retrieve ipld.NodeStats information
	DAGREQTYPE_DAG_STAT DAGREQTYPE = 5
)

func (DAGREQTYPE) EnumDescriptor

func (DAGREQTYPE) EnumDescriptor() ([]byte, []int)

func (DAGREQTYPE) String

func (x DAGREQTYPE) String() string

type DAGService added in v3.2.3

type DAGService struct {
	// contains filtered or unexported fields
}

DAGService implements ipld.DAGService using NodeAPIClient

func NewDAGService added in v3.2.3

func NewDAGService(client NodeAPIClient) *DAGService

NewDAGService returns a DAGService that implements ipld.DAGService using NodeAPIClient

func (*DAGService) Add added in v3.2.3

func (d *DAGService) Add(ctx context.Context, n ipld.Node) error

Add adds a node to this DAG.

func (*DAGService) AddMany added in v3.2.3

func (d *DAGService) AddMany(ctx context.Context, ns []ipld.Node) error

AddMany adds many nodes to this DAG.

func (*DAGService) Get added in v3.2.3

func (d *DAGService) Get(ctx context.Context, c cid.Cid) (ipld.Node, error)

Get retrieves nodes by CID. Depending on the NodeGetter implementation, this may involve fetching the Node from a remote machine; consider setting a deadline in the context.

func (*DAGService) GetMany added in v3.2.3

func (d *DAGService) GetMany(ctx context.Context, cs []cid.Cid) <-chan *ipld.NodeOption

GetMany returns a channel of NodeOptions given a set of CIDs.

func (*DAGService) Remove added in v3.2.3

func (d *DAGService) Remove(ctx context.Context, c cid.Cid) error

Remove removes a node from this DAG.

Remove does not error if the requested node does not exist.

func (*DAGService) RemoveMany added in v3.2.3

func (d *DAGService) RemoveMany(ctx context.Context, cs []cid.Cid) error

RemoveMany removes many nodes from this DAG.

RemoveMany does not error if any nodes do not exist.

type DagRequest

type DagRequest struct {
	// indicates the request being performed
	// sent by: all request types
	RequestType DAGREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.DAGREQTYPE" json:"requestType,omitempty"`
	// data that we will be storing
	// sent by: DAG_PUT, DAG_NEW_NODE
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// the object encoding type (raw, cbor, protobuf, etc...)
	// sent by: DAG_PUT
	ObjectEncoding string `protobuf:"bytes,3,opt,name=objectEncoding,proto3" json:"objectEncoding,omitempty"`
	// the serialization format (raw, cbor, protobuf, etc...)
	// sent by: DAG_PUT
	SerializationFormat string `protobuf:"bytes,4,opt,name=serializationFormat,proto3" json:"serializationFormat,omitempty"`
	// the hash function to to use (sha2-256, sha3-512, etc...)
	// sent by: DAG_PUT, DAG_NEW_NODE, DAG_ADD_LINKS
	HashFunc string `protobuf:"bytes,5,opt,name=hashFunc,proto3" json:"hashFunc,omitempty"`
	// the cid version to use (0, 1)
	// sent by: DAG_PUT, DAG_NEW_NODE
	CidVersion int64 `protobuf:"varint,6,opt,name=cidVersion,proto3" json:"cidVersion,omitempty"`
	// the hash of the object we are processing
	// sent by: DAG_GET, DAG_NEW_NODe, DAG_ADD_LINKS, DAG_GET_LINKS
	Hash string `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"`
	// indicates links and their names. key = name, value = link hash
	// sent by: DAG_NEW_NODE, DAG_ADD_LINKS
	Links map[string]string `` /* 151-byte string literal not displayed */
}

Used to submit a request to Dag or DagStream RPCs

func (*DagRequest) Descriptor

func (*DagRequest) Descriptor() ([]byte, []int)

func (*DagRequest) GetCidVersion

func (m *DagRequest) GetCidVersion() int64

func (*DagRequest) GetData

func (m *DagRequest) GetData() []byte

func (*DagRequest) GetHash

func (m *DagRequest) GetHash() string

func (*DagRequest) GetHashFunc

func (m *DagRequest) GetHashFunc() string
func (m *DagRequest) GetLinks() map[string]string

func (*DagRequest) GetObjectEncoding

func (m *DagRequest) GetObjectEncoding() string

func (*DagRequest) GetRequestType

func (m *DagRequest) GetRequestType() DAGREQTYPE

func (*DagRequest) GetSerializationFormat

func (m *DagRequest) GetSerializationFormat() string

func (*DagRequest) Marshal

func (m *DagRequest) Marshal() (dAtA []byte, err error)

func (*DagRequest) MarshalTo

func (m *DagRequest) MarshalTo(dAtA []byte) (int, error)

func (*DagRequest) MarshalToSizedBuffer

func (m *DagRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DagRequest) ProtoMessage

func (*DagRequest) ProtoMessage()

func (*DagRequest) Reset

func (m *DagRequest) Reset()

func (*DagRequest) Size

func (m *DagRequest) Size() (n int)

func (*DagRequest) String

func (m *DagRequest) String() string

func (*DagRequest) Unmarshal

func (m *DagRequest) Unmarshal(dAtA []byte) error

func (*DagRequest) XXX_DiscardUnknown

func (m *DagRequest) XXX_DiscardUnknown()

func (*DagRequest) XXX_Marshal

func (m *DagRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DagRequest) XXX_Merge

func (m *DagRequest) XXX_Merge(src proto.Message)

func (*DagRequest) XXX_Size

func (m *DagRequest) XXX_Size() int

func (*DagRequest) XXX_Unmarshal

func (m *DagRequest) XXX_Unmarshal(b []byte) error

type DagResponse

type DagResponse struct {
	// indicates the request being performed
	// sent by: all request types
	RequestType DAGREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.DAGREQTYPE" json:"requestType,omitempty"`
	// returns the hashes of newly generated IPLD objects
	// sent by: DAG_PUT, DAG_NEW_NODE, DAG_ADD_LINKS, DAG_GET_LINKS
	Hashes []string `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// the actual data contained by the IPLD object
	// sent by: DAG_GET
	RawData []byte `protobuf:"bytes,3,opt,name=rawData,proto3" json:"rawData,omitempty"`
	// the links contained within an IPLD node object
	// sent by: DAG_GET_LINKS
	Links []*IPLDLink `protobuf:"bytes,4,rep,name=links,proto3" json:"links,omitempty"`
	// maps ipld cids to a ipld.NodeStat object equivalent
	// sent by: DAG_STAT
	NodeStats map[string]*IPLDStat `` /* 159-byte string literal not displayed */
}

Used in response to a Dag or DagStream RPC

func (*DagResponse) Descriptor

func (*DagResponse) Descriptor() ([]byte, []int)

func (*DagResponse) GetHashes

func (m *DagResponse) GetHashes() []string
func (m *DagResponse) GetLinks() []*IPLDLink

func (*DagResponse) GetNodeStats added in v3.2.2

func (m *DagResponse) GetNodeStats() map[string]*IPLDStat

func (*DagResponse) GetRawData

func (m *DagResponse) GetRawData() []byte

func (*DagResponse) GetRequestType

func (m *DagResponse) GetRequestType() DAGREQTYPE

func (*DagResponse) Marshal

func (m *DagResponse) Marshal() (dAtA []byte, err error)

func (*DagResponse) MarshalTo

func (m *DagResponse) MarshalTo(dAtA []byte) (int, error)

func (*DagResponse) MarshalToSizedBuffer

func (m *DagResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DagResponse) ProtoMessage

func (*DagResponse) ProtoMessage()

func (*DagResponse) Reset

func (m *DagResponse) Reset()

func (*DagResponse) Size

func (m *DagResponse) Size() (n int)

func (*DagResponse) String

func (m *DagResponse) String() string

func (*DagResponse) Unmarshal

func (m *DagResponse) Unmarshal(dAtA []byte) error

func (*DagResponse) XXX_DiscardUnknown

func (m *DagResponse) XXX_DiscardUnknown()

func (*DagResponse) XXX_Marshal

func (m *DagResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DagResponse) XXX_Merge

func (m *DagResponse) XXX_Merge(src proto.Message)

func (*DagResponse) XXX_Size

func (m *DagResponse) XXX_Size() int

func (*DagResponse) XXX_Unmarshal

func (m *DagResponse) XXX_Unmarshal(b []byte) error

type DownloadRequest

type DownloadRequest struct {
	// hash is the ipfs hash/cid (content identifier) of the data to download
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// chunkSize specifies the size of chunks to be sent to the client
	// it allows us to efficiently control incoming data amounts which
	// is useful on machines with low-memory
	ChunkSize int32 `protobuf:"varint,2,opt,name=chunkSize,proto3" json:"chunkSize,omitempty"`
	// Range start and end mirrors developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range.
	// If both is none zero, only data within range is requested.
	// The unit of range is alway in bytes.
	// If used, please check the returned range values in blobs to make sure this feature is supported.
	RangeStart uint64 `protobuf:"varint,3,opt,name=rangeStart,proto3" json:"rangeStart,omitempty"`
	RangeEnd   uint64 `protobuf:"varint,4,opt,name=rangeEnd,proto3" json:"rangeEnd,omitempty"`
}

DownloadRequest is used to download a UnixFS object although it can in theory be used with other type of objects there may be some undefined behavior

func (*DownloadRequest) Descriptor

func (*DownloadRequest) Descriptor() ([]byte, []int)

func (*DownloadRequest) GetChunkSize

func (m *DownloadRequest) GetChunkSize() int32

func (*DownloadRequest) GetHash

func (m *DownloadRequest) GetHash() string

func (*DownloadRequest) GetRangeEnd added in v3.1.1

func (m *DownloadRequest) GetRangeEnd() uint64

func (*DownloadRequest) GetRangeStart added in v3.1.1

func (m *DownloadRequest) GetRangeStart() uint64

func (*DownloadRequest) Marshal

func (m *DownloadRequest) Marshal() (dAtA []byte, err error)

func (*DownloadRequest) MarshalTo

func (m *DownloadRequest) MarshalTo(dAtA []byte) (int, error)

func (*DownloadRequest) MarshalToSizedBuffer

func (m *DownloadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DownloadRequest) ProtoMessage

func (*DownloadRequest) ProtoMessage()

func (*DownloadRequest) Reset

func (m *DownloadRequest) Reset()

func (*DownloadRequest) Size

func (m *DownloadRequest) Size() (n int)

func (*DownloadRequest) String

func (m *DownloadRequest) String() string

func (*DownloadRequest) Unmarshal

func (m *DownloadRequest) Unmarshal(dAtA []byte) error

func (*DownloadRequest) XXX_DiscardUnknown

func (m *DownloadRequest) XXX_DiscardUnknown()

func (*DownloadRequest) XXX_Marshal

func (m *DownloadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DownloadRequest) XXX_Merge

func (m *DownloadRequest) XXX_Merge(src proto.Message)

func (*DownloadRequest) XXX_Size

func (m *DownloadRequest) XXX_Size() int

func (*DownloadRequest) XXX_Unmarshal

func (m *DownloadRequest) XXX_Unmarshal(b []byte) error

type DownloadResponse

type DownloadResponse struct {
	// blob is a single chunk of data
	Blob *Blob `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"`
}

DownloadResponse contains the response to a download request which allows the gRPC server to stream blobs to the client

func (*DownloadResponse) Descriptor

func (*DownloadResponse) Descriptor() ([]byte, []int)

func (*DownloadResponse) GetBlob

func (m *DownloadResponse) GetBlob() *Blob

func (*DownloadResponse) Marshal

func (m *DownloadResponse) Marshal() (dAtA []byte, err error)

func (*DownloadResponse) MarshalTo

func (m *DownloadResponse) MarshalTo(dAtA []byte) (int, error)

func (*DownloadResponse) MarshalToSizedBuffer

func (m *DownloadResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DownloadResponse) ProtoMessage

func (*DownloadResponse) ProtoMessage()

func (*DownloadResponse) Reset

func (m *DownloadResponse) Reset()

func (*DownloadResponse) Size

func (m *DownloadResponse) Size() (n int)

func (*DownloadResponse) String

func (m *DownloadResponse) String() string

func (*DownloadResponse) Unmarshal

func (m *DownloadResponse) Unmarshal(dAtA []byte) error

func (*DownloadResponse) XXX_DiscardUnknown

func (m *DownloadResponse) XXX_DiscardUnknown()

func (*DownloadResponse) XXX_Marshal

func (m *DownloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DownloadResponse) XXX_Merge

func (m *DownloadResponse) XXX_Merge(src proto.Message)

func (*DownloadResponse) XXX_Size

func (m *DownloadResponse) XXX_Size() int

func (*DownloadResponse) XXX_Unmarshal

func (m *DownloadResponse) XXX_Unmarshal(b []byte) error

type EXTRASREQTYPE

type EXTRASREQTYPE int32

EXTRASREQTYPE indicates the particular Extras request being performed

const (
	// EX_ENABLE is used to enable a particular node extras feature
	EXTRASREQTYPE_EX_ENABLE EXTRASREQTYPE = 0
	// EX_DISABLE is used to disable a particular node extras feature
	EXTRASREQTYPE_EX_DISABLE EXTRASREQTYPE = 1
)

func (EXTRASREQTYPE) EnumDescriptor

func (EXTRASREQTYPE) EnumDescriptor() ([]byte, []int)

func (EXTRASREQTYPE) String

func (x EXTRASREQTYPE) String() string

type EXTRASTYPE

type EXTRASTYPE int32

EXTRASTYPE denotes a particular extras type

const (
	// IDENTIFY is the identify service
	EXTRASTYPE_IDENTIFY EXTRASTYPE = 0
	// PUBSUB is the libp2p pubsub system
	EXTRASTYPE_PUBSUB EXTRASTYPE = 1
	// DISCOVERY is a libp2p discovery service
	EXTRASTYPE_DISCOVERY EXTRASTYPE = 2
	// MDNS is used to discover libp2p hosts over mdns
	EXTRASTYPE_MDNS EXTRASTYPE = 3
)

func (EXTRASTYPE) EnumDescriptor

func (EXTRASTYPE) EnumDescriptor() ([]byte, []int)

func (EXTRASTYPE) String

func (x EXTRASTYPE) String() string

type Empty

type Empty struct {
}

Empty is an empty message

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) Marshal

func (m *Empty) Marshal() (dAtA []byte, err error)

func (*Empty) MarshalTo

func (m *Empty) MarshalTo(dAtA []byte) (int, error)

func (*Empty) MarshalToSizedBuffer

func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) Size

func (m *Empty) Size() (n int)

func (*Empty) String

func (m *Empty) String() string

func (*Empty) Unmarshal

func (m *Empty) Unmarshal(dAtA []byte) error

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type ExtrasRequest

type ExtrasRequest struct {
	// indicates the request being performed
	RequestType EXTRASREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.EXTRASREQTYPE" json:"requestType,omitempty"`
	// indicates the extras feature this request applies to
	ExtrasFeature EXTRASTYPE `protobuf:"varint,2,opt,name=extrasFeature,proto3,enum=pb.EXTRASTYPE" json:"extrasFeature,omitempty"`
}

func (*ExtrasRequest) Descriptor

func (*ExtrasRequest) Descriptor() ([]byte, []int)

func (*ExtrasRequest) GetExtrasFeature

func (m *ExtrasRequest) GetExtrasFeature() EXTRASTYPE

func (*ExtrasRequest) GetRequestType

func (m *ExtrasRequest) GetRequestType() EXTRASREQTYPE

func (*ExtrasRequest) Marshal

func (m *ExtrasRequest) Marshal() (dAtA []byte, err error)

func (*ExtrasRequest) MarshalTo

func (m *ExtrasRequest) MarshalTo(dAtA []byte) (int, error)

func (*ExtrasRequest) MarshalToSizedBuffer

func (m *ExtrasRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExtrasRequest) ProtoMessage

func (*ExtrasRequest) ProtoMessage()

func (*ExtrasRequest) Reset

func (m *ExtrasRequest) Reset()

func (*ExtrasRequest) Size

func (m *ExtrasRequest) Size() (n int)

func (*ExtrasRequest) String

func (m *ExtrasRequest) String() string

func (*ExtrasRequest) Unmarshal

func (m *ExtrasRequest) Unmarshal(dAtA []byte) error

func (*ExtrasRequest) XXX_DiscardUnknown

func (m *ExtrasRequest) XXX_DiscardUnknown()

func (*ExtrasRequest) XXX_Marshal

func (m *ExtrasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExtrasRequest) XXX_Merge

func (m *ExtrasRequest) XXX_Merge(src proto.Message)

func (*ExtrasRequest) XXX_Size

func (m *ExtrasRequest) XXX_Size() int

func (*ExtrasRequest) XXX_Unmarshal

func (m *ExtrasRequest) XXX_Unmarshal(b []byte) error

type FileAPIClient

type FileAPIClient interface {
	// UploadFile allows uploading a file as a UnixFS object (equivalent to ipfs add)
	UploadFile(ctx context.Context, opts ...grpc.CallOption) (FileAPI_UploadFileClient, error)
	// DownloadFile allows downloading a UnixFS object (equivalent to ipfs get)
	DownloadFile(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (FileAPI_DownloadFileClient, error)
}

FileAPIClient is the client API for FileAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewFileAPIClient

func NewFileAPIClient(cc *grpc.ClientConn) FileAPIClient

type FileAPIServer

type FileAPIServer interface {
	// UploadFile allows uploading a file as a UnixFS object (equivalent to ipfs add)
	UploadFile(FileAPI_UploadFileServer) error
	// DownloadFile allows downloading a UnixFS object (equivalent to ipfs get)
	DownloadFile(*DownloadRequest, FileAPI_DownloadFileServer) error
}

FileAPIServer is the server API for FileAPI service.

type FileAPI_DownloadFileClient

type FileAPI_DownloadFileClient interface {
	Recv() (*DownloadResponse, error)
	grpc.ClientStream
}

type FileAPI_DownloadFileServer

type FileAPI_DownloadFileServer interface {
	Send(*DownloadResponse) error
	grpc.ServerStream
}

type FileAPI_UploadFileClient

type FileAPI_UploadFileClient interface {
	Send(*UploadRequest) error
	CloseAndRecv() (*PutResponse, error)
	grpc.ClientStream
}

type FileAPI_UploadFileServer

type FileAPI_UploadFileServer interface {
	SendAndClose(*PutResponse) error
	Recv() (*UploadRequest, error)
	grpc.ServerStream
}

type GCREQTYPE

type GCREQTYPE int32

GCREQTYPE specifies the type of GC management call being performed

const (
	// GC_START is used to start gc
	GCREQTYPE_GC_START GCREQTYPE = 0
	// C_STOP is used to stop GC
	GCREQTYPE_GC_STOP GCREQTYPE = 1
	// GC_STATUS is used to retrieve gc status
	GCREQTYPE_GC_STATUS GCREQTYPE = 2
)

func (GCREQTYPE) EnumDescriptor

func (GCREQTYPE) EnumDescriptor() ([]byte, []int)

func (GCREQTYPE) String

func (x GCREQTYPE) String() string

type GRPCConnectionProvider added in v3.2.0

type GRPCConnectionProvider interface {
	//ConnectionToServer returns grpc client connection from AddrInfo
	ConnectionToServer(a *AddrInfo) (conn *grpc.ClientConn, err error)
}

GRPCConnectionProvider provides the ConnectionToServer function, which returns a *grpc.ClientConn from a AddrInfo, using the IP address given in MultiAddress, port from GrpcPort, and certificate checked with peer.ID.

GRPCConnectionProvider is used by replication server and clients to connect to other replication servers

TODO: - investigate grpc.WithContextDialer to use with go-libp2p-swarm

type GetPeersResponse

type GetPeersResponse struct {
	// a slice of peer IDs
	PeerIDs []string `protobuf:"bytes,1,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"`
}

GetPeersResponse is a response to GetPeers containing a slice of peer IDs

func (*GetPeersResponse) Descriptor

func (*GetPeersResponse) Descriptor() ([]byte, []int)

func (*GetPeersResponse) GetPeerIDs

func (m *GetPeersResponse) GetPeerIDs() []string

func (*GetPeersResponse) Marshal

func (m *GetPeersResponse) Marshal() (dAtA []byte, err error)

func (*GetPeersResponse) MarshalTo

func (m *GetPeersResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetPeersResponse) MarshalToSizedBuffer

func (m *GetPeersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetPeersResponse) ProtoMessage

func (*GetPeersResponse) ProtoMessage()

func (*GetPeersResponse) Reset

func (m *GetPeersResponse) Reset()

func (*GetPeersResponse) Size

func (m *GetPeersResponse) Size() (n int)

func (*GetPeersResponse) String

func (m *GetPeersResponse) String() string

func (*GetPeersResponse) Unmarshal

func (m *GetPeersResponse) Unmarshal(dAtA []byte) error

func (*GetPeersResponse) XXX_DiscardUnknown

func (m *GetPeersResponse) XXX_DiscardUnknown()

func (*GetPeersResponse) XXX_Marshal

func (m *GetPeersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetPeersResponse) XXX_Merge

func (m *GetPeersResponse) XXX_Merge(src proto.Message)

func (*GetPeersResponse) XXX_Size

func (m *GetPeersResponse) XXX_Size() int

func (*GetPeersResponse) XXX_Unmarshal

func (m *GetPeersResponse) XXX_Unmarshal(b []byte) error

type HostInfo added in v3.1.0

type HostInfo interface {
	ID() peer.ID
	Addrs() []multiaddr.Multiaddr
}

HostInfo is an interface that we can build an AddrInfo from. It is a subset of libp2p/go-libp2p-core/host/#Host.

type IPLDLink struct {
	// multihash of the target object
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// utf string name. should be unique per object
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// cumulative size of target object
	Size_ uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
}

An IPFS MerkleDAG Link

func (*IPLDLink) Descriptor

func (*IPLDLink) Descriptor() ([]byte, []int)

func (*IPLDLink) GetHash

func (m *IPLDLink) GetHash() []byte

func (*IPLDLink) GetName

func (m *IPLDLink) GetName() string

func (*IPLDLink) GetSize_

func (m *IPLDLink) GetSize_() uint64

func (*IPLDLink) Marshal

func (m *IPLDLink) Marshal() (dAtA []byte, err error)

func (*IPLDLink) MarshalTo

func (m *IPLDLink) MarshalTo(dAtA []byte) (int, error)

func (*IPLDLink) MarshalToSizedBuffer

func (m *IPLDLink) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IPLDLink) ProtoMessage

func (*IPLDLink) ProtoMessage()

func (*IPLDLink) Reset

func (m *IPLDLink) Reset()

func (*IPLDLink) Size

func (m *IPLDLink) Size() (n int)

func (*IPLDLink) String

func (m *IPLDLink) String() string

func (*IPLDLink) Unmarshal

func (m *IPLDLink) Unmarshal(dAtA []byte) error

func (*IPLDLink) XXX_DiscardUnknown

func (m *IPLDLink) XXX_DiscardUnknown()

func (*IPLDLink) XXX_Marshal

func (m *IPLDLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IPLDLink) XXX_Merge

func (m *IPLDLink) XXX_Merge(src proto.Message)

func (*IPLDLink) XXX_Size

func (m *IPLDLink) XXX_Size() int

func (*IPLDLink) XXX_Unmarshal

func (m *IPLDLink) XXX_Unmarshal(b []byte) error

type IPLDNode

type IPLDNode struct {
	// refs to other objects
	Links []*IPLDLink `protobuf:"bytes,2,rep,name=links,proto3" json:"links,omitempty"`
	// opaque user data
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

An IPFS MerkleDAG Node

func (*IPLDNode) Descriptor

func (*IPLDNode) Descriptor() ([]byte, []int)

func (*IPLDNode) GetData

func (m *IPLDNode) GetData() []byte
func (m *IPLDNode) GetLinks() []*IPLDLink

func (*IPLDNode) Marshal

func (m *IPLDNode) Marshal() (dAtA []byte, err error)

func (*IPLDNode) MarshalTo

func (m *IPLDNode) MarshalTo(dAtA []byte) (int, error)

func (*IPLDNode) MarshalToSizedBuffer

func (m *IPLDNode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IPLDNode) ProtoMessage

func (*IPLDNode) ProtoMessage()

func (*IPLDNode) Reset

func (m *IPLDNode) Reset()

func (*IPLDNode) Size

func (m *IPLDNode) Size() (n int)

func (*IPLDNode) String

func (m *IPLDNode) String() string

func (*IPLDNode) Unmarshal

func (m *IPLDNode) Unmarshal(dAtA []byte) error

func (*IPLDNode) XXX_DiscardUnknown

func (m *IPLDNode) XXX_DiscardUnknown()

func (*IPLDNode) XXX_Marshal

func (m *IPLDNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IPLDNode) XXX_Merge

func (m *IPLDNode) XXX_Merge(src proto.Message)

func (*IPLDNode) XXX_Size

func (m *IPLDNode) XXX_Size() int

func (*IPLDNode) XXX_Unmarshal

func (m *IPLDNode) XXX_Unmarshal(b []byte) error

type IPLDStat added in v3.2.2

type IPLDStat struct {
	// number of links in link table
	NumLinks int64 `protobuf:"varint,1,opt,name=numLinks,proto3" json:"numLinks,omitempty"`
	// size of the raw, encoded data
	BlockSize int64 `protobuf:"varint,2,opt,name=blockSize,proto3" json:"blockSize,omitempty"`
	// size of the links segment
	LinkSize int64 `protobuf:"varint,3,opt,name=linkSize,proto3" json:"linkSize,omitempty"`
	// cumulative size of object and its references
	CumulativeSize int64 `protobuf:"varint,4,opt,name=cumulativeSize,proto3" json:"cumulativeSize,omitempty"`
	// size of the data segment
	DataSize int64 `protobuf:"varint,5,opt,name=dataSize,proto3" json:"dataSize,omitempty"`
}

IPLDStat is statistics about an individual dag node it is a protocol buffer wrapper around ipld.NodeStat

func (*IPLDStat) Descriptor added in v3.2.2

func (*IPLDStat) Descriptor() ([]byte, []int)

func (*IPLDStat) GetBlockSize added in v3.2.2

func (m *IPLDStat) GetBlockSize() int64

func (*IPLDStat) GetCumulativeSize added in v3.2.2

func (m *IPLDStat) GetCumulativeSize() int64

func (*IPLDStat) GetDataSize added in v3.2.2

func (m *IPLDStat) GetDataSize() int64

func (*IPLDStat) GetLinkSize added in v3.2.2

func (m *IPLDStat) GetLinkSize() int64
func (m *IPLDStat) GetNumLinks() int64

func (*IPLDStat) Marshal added in v3.2.2

func (m *IPLDStat) Marshal() (dAtA []byte, err error)

func (*IPLDStat) MarshalTo added in v3.2.2

func (m *IPLDStat) MarshalTo(dAtA []byte) (int, error)

func (*IPLDStat) MarshalToSizedBuffer added in v3.2.2

func (m *IPLDStat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IPLDStat) ProtoMessage added in v3.2.2

func (*IPLDStat) ProtoMessage()

func (*IPLDStat) Reset added in v3.2.2

func (m *IPLDStat) Reset()

func (*IPLDStat) Size added in v3.2.2

func (m *IPLDStat) Size() (n int)

func (*IPLDStat) String added in v3.2.2

func (m *IPLDStat) String() string

func (*IPLDStat) Unmarshal added in v3.2.2

func (m *IPLDStat) Unmarshal(dAtA []byte) error

func (*IPLDStat) XXX_DiscardUnknown added in v3.2.2

func (m *IPLDStat) XXX_DiscardUnknown()

func (*IPLDStat) XXX_Marshal added in v3.2.2

func (m *IPLDStat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IPLDStat) XXX_Merge added in v3.2.2

func (m *IPLDStat) XXX_Merge(src proto.Message)

func (*IPLDStat) XXX_Size added in v3.2.2

func (m *IPLDStat) XXX_Size() int

func (*IPLDStat) XXX_Unmarshal added in v3.2.2

func (m *IPLDStat) XXX_Unmarshal(b []byte) error

type KSREQTYPE

type KSREQTYPE int32

KSREQTYPE indicates the particular KeystoreAPI request being performed

const (
	// KS_HAS is used to check if the key exists in our keystore
	KSREQTYPE_KS_HAS KSREQTYPE = 0
	// KS_GET is used to retrieve private key bytes from our keystore
	KSREQTYPE_KS_GET KSREQTYPE = 1
	// KS_PUT is used to store private key bytes in our keystore
	KSREQTYPE_KS_PUT KSREQTYPE = 2
	// KS_DELETE is used to delete private keys from our keystore
	KSREQTYPE_KS_DELETE KSREQTYPE = 3
	// KS_LIST is used to list all keys in our keystore by their name
	KSREQTYPE_KS_LIST KSREQTYPE = 4
)

func (KSREQTYPE) EnumDescriptor

func (KSREQTYPE) EnumDescriptor() ([]byte, []int)

func (KSREQTYPE) String

func (x KSREQTYPE) String() string

type KeystoreRequest

type KeystoreRequest struct {
	// indicates the request type being performed
	RequestType KSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.KSREQTYPE" json:"requestType,omitempty"`
	// name of the key the request is for
	// sent by: KS_HAS, KS_GET, KS_PUT, KS_DELETE
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// the actual private key bytes
	// sent by: KS_PUT
	PrivateKey []byte `protobuf:"bytes,3,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
}

Used to submit a request to Keystore RPC

func (*KeystoreRequest) Descriptor

func (*KeystoreRequest) Descriptor() ([]byte, []int)

func (*KeystoreRequest) GetName

func (m *KeystoreRequest) GetName() string

func (*KeystoreRequest) GetPrivateKey

func (m *KeystoreRequest) GetPrivateKey() []byte

func (*KeystoreRequest) GetRequestType

func (m *KeystoreRequest) GetRequestType() KSREQTYPE

func (*KeystoreRequest) Marshal

func (m *KeystoreRequest) Marshal() (dAtA []byte, err error)

func (*KeystoreRequest) MarshalTo

func (m *KeystoreRequest) MarshalTo(dAtA []byte) (int, error)

func (*KeystoreRequest) MarshalToSizedBuffer

func (m *KeystoreRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KeystoreRequest) ProtoMessage

func (*KeystoreRequest) ProtoMessage()

func (*KeystoreRequest) Reset

func (m *KeystoreRequest) Reset()

func (*KeystoreRequest) Size

func (m *KeystoreRequest) Size() (n int)

func (*KeystoreRequest) String

func (m *KeystoreRequest) String() string

func (*KeystoreRequest) Unmarshal

func (m *KeystoreRequest) Unmarshal(dAtA []byte) error

func (*KeystoreRequest) XXX_DiscardUnknown

func (m *KeystoreRequest) XXX_DiscardUnknown()

func (*KeystoreRequest) XXX_Marshal

func (m *KeystoreRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeystoreRequest) XXX_Merge

func (m *KeystoreRequest) XXX_Merge(src proto.Message)

func (*KeystoreRequest) XXX_Size

func (m *KeystoreRequest) XXX_Size() int

func (*KeystoreRequest) XXX_Unmarshal

func (m *KeystoreRequest) XXX_Unmarshal(b []byte) error

type KeystoreResponse

type KeystoreResponse struct {
	// indicates the request type being performed
	RequestType KSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.KSREQTYPE" json:"requestType,omitempty"`
	// the private key bytes
	// sent by: KS_GET
	PrivateKey []byte `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	// contains all known key names
	// sent by: KS_LIST
	KeyNames []string `protobuf:"bytes,3,rep,name=keyNames,proto3" json:"keyNames,omitempty"`
	// indicates if we have the key in our keystore
	// sent by: KS_HAS
	Has bool `protobuf:"varint,4,opt,name=has,proto3" json:"has,omitempty"`
}

Used in response to a Keystore RPC

func (*KeystoreResponse) Descriptor

func (*KeystoreResponse) Descriptor() ([]byte, []int)

func (*KeystoreResponse) GetHas

func (m *KeystoreResponse) GetHas() bool

func (*KeystoreResponse) GetKeyNames

func (m *KeystoreResponse) GetKeyNames() []string

func (*KeystoreResponse) GetPrivateKey

func (m *KeystoreResponse) GetPrivateKey() []byte

func (*KeystoreResponse) GetRequestType

func (m *KeystoreResponse) GetRequestType() KSREQTYPE

func (*KeystoreResponse) Marshal

func (m *KeystoreResponse) Marshal() (dAtA []byte, err error)

func (*KeystoreResponse) MarshalTo

func (m *KeystoreResponse) MarshalTo(dAtA []byte) (int, error)

func (*KeystoreResponse) MarshalToSizedBuffer

func (m *KeystoreResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KeystoreResponse) ProtoMessage

func (*KeystoreResponse) ProtoMessage()

func (*KeystoreResponse) Reset

func (m *KeystoreResponse) Reset()

func (*KeystoreResponse) Size

func (m *KeystoreResponse) Size() (n int)

func (*KeystoreResponse) String

func (m *KeystoreResponse) String() string

func (*KeystoreResponse) Unmarshal

func (m *KeystoreResponse) Unmarshal(dAtA []byte) error

func (*KeystoreResponse) XXX_DiscardUnknown

func (m *KeystoreResponse) XXX_DiscardUnknown()

func (*KeystoreResponse) XXX_Marshal

func (m *KeystoreResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeystoreResponse) XXX_Merge

func (m *KeystoreResponse) XXX_Merge(src proto.Message)

func (*KeystoreResponse) XXX_Size

func (m *KeystoreResponse) XXX_Size() int

func (*KeystoreResponse) XXX_Unmarshal

func (m *KeystoreResponse) XXX_Unmarshal(b []byte) error

type ManageGCRequest

type ManageGCRequest struct {
	// type is the type of gc request being performed
	Type GCREQTYPE `protobuf:"varint,1,opt,name=type,proto3,enum=pb.GCREQTYPE" json:"type,omitempty"`
}

ManageGCRequest is a message used to control TemporalX garbage collection

func (*ManageGCRequest) Descriptor

func (*ManageGCRequest) Descriptor() ([]byte, []int)

func (*ManageGCRequest) GetType

func (m *ManageGCRequest) GetType() GCREQTYPE

func (*ManageGCRequest) Marshal

func (m *ManageGCRequest) Marshal() (dAtA []byte, err error)

func (*ManageGCRequest) MarshalTo

func (m *ManageGCRequest) MarshalTo(dAtA []byte) (int, error)

func (*ManageGCRequest) MarshalToSizedBuffer

func (m *ManageGCRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ManageGCRequest) ProtoMessage

func (*ManageGCRequest) ProtoMessage()

func (*ManageGCRequest) Reset

func (m *ManageGCRequest) Reset()

func (*ManageGCRequest) Size

func (m *ManageGCRequest) Size() (n int)

func (*ManageGCRequest) String

func (m *ManageGCRequest) String() string

func (*ManageGCRequest) Unmarshal

func (m *ManageGCRequest) Unmarshal(dAtA []byte) error

func (*ManageGCRequest) XXX_DiscardUnknown

func (m *ManageGCRequest) XXX_DiscardUnknown()

func (*ManageGCRequest) XXX_Marshal

func (m *ManageGCRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManageGCRequest) XXX_Merge

func (m *ManageGCRequest) XXX_Merge(src proto.Message)

func (*ManageGCRequest) XXX_Size

func (m *ManageGCRequest) XXX_Size() int

func (*ManageGCRequest) XXX_Unmarshal

func (m *ManageGCRequest) XXX_Unmarshal(b []byte) error

type ManageGCResponse

type ManageGCResponse struct {
	// status contains a status message
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}

ManageGCResponse is a message used as a response to gc control requests

func (*ManageGCResponse) Descriptor

func (*ManageGCResponse) Descriptor() ([]byte, []int)

func (*ManageGCResponse) GetStatus

func (m *ManageGCResponse) GetStatus() string

func (*ManageGCResponse) Marshal

func (m *ManageGCResponse) Marshal() (dAtA []byte, err error)

func (*ManageGCResponse) MarshalTo

func (m *ManageGCResponse) MarshalTo(dAtA []byte) (int, error)

func (*ManageGCResponse) MarshalToSizedBuffer

func (m *ManageGCResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ManageGCResponse) ProtoMessage

func (*ManageGCResponse) ProtoMessage()

func (*ManageGCResponse) Reset

func (m *ManageGCResponse) Reset()

func (*ManageGCResponse) Size

func (m *ManageGCResponse) Size() (n int)

func (*ManageGCResponse) String

func (m *ManageGCResponse) String() string

func (*ManageGCResponse) Unmarshal

func (m *ManageGCResponse) Unmarshal(dAtA []byte) error

func (*ManageGCResponse) XXX_DiscardUnknown

func (m *ManageGCResponse) XXX_DiscardUnknown()

func (*ManageGCResponse) XXX_Marshal

func (m *ManageGCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ManageGCResponse) XXX_Merge

func (m *ManageGCResponse) XXX_Merge(src proto.Message)

func (*ManageGCResponse) XXX_Size

func (m *ManageGCResponse) XXX_Size() int

func (*ManageGCResponse) XXX_Unmarshal

func (m *ManageGCResponse) XXX_Unmarshal(b []byte) error

type NameSysAPIClient

type NameSysAPIClient interface {
	// NameSysResolve is used to resolve a name, waiting for the request to complete
	NameSysResolve(ctx context.Context, in *NameSysResolveRequest, opts ...grpc.CallOption) (*NameSysResolveResult, error)
	// NameSysResolveAsync is like Resolve, except instead of waiting for the request
	// to complete, we send back a stream which we will send the result on
	NameSysResolveAsync(ctx context.Context, in *NameSysResolveRequest, opts ...grpc.CallOption) (NameSysAPI_NameSysResolveAsyncClient, error)
	// NameSysPublish is used to publish an IPNS record, with/with-out an EOL
	NameSysPublish(ctx context.Context, in *NameSysPublishRequest, opts ...grpc.CallOption) (*Empty, error)
}

NameSysAPIClient is the client API for NameSysAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNameSysAPIClient

func NewNameSysAPIClient(cc *grpc.ClientConn) NameSysAPIClient

type NameSysAPIServer

type NameSysAPIServer interface {
	// NameSysResolve is used to resolve a name, waiting for the request to complete
	NameSysResolve(context.Context, *NameSysResolveRequest) (*NameSysResolveResult, error)
	// NameSysResolveAsync is like Resolve, except instead of waiting for the request
	// to complete, we send back a stream which we will send the result on
	NameSysResolveAsync(*NameSysResolveRequest, NameSysAPI_NameSysResolveAsyncServer) error
	// NameSysPublish is used to publish an IPNS record, with/with-out an EOL
	NameSysPublish(context.Context, *NameSysPublishRequest) (*Empty, error)
}

NameSysAPIServer is the server API for NameSysAPI service.

type NameSysAPI_NameSysResolveAsyncClient

type NameSysAPI_NameSysResolveAsyncClient interface {
	Recv() (*NameSysResolveResult, error)
	grpc.ClientStream
}

type NameSysAPI_NameSysResolveAsyncServer

type NameSysAPI_NameSysResolveAsyncServer interface {
	Send(*NameSysResolveResult) error
	grpc.ServerStream
}

type NameSysPublishRequest

type NameSysPublishRequest struct {
	// the private key (name) for this record
	PrivateKey []byte `protobuf:"bytes,1,opt,name=privateKey,proto3" json:"privateKey,omitempty"`
	// the value of this record
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// the eol for this publish, if 0 implies
	// as NameSys::Publish call, if non 0 implies
	// a NameSys:PublishWithEOL call
	Eol int32 `protobuf:"varint,3,opt,name=eol,proto3" json:"eol,omitempty"`
	// if set, allows us to override default
	// ttl value of ipns records
	Ttl int32 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"`
}

NameSysPublishRequest is used to publish a value

func (*NameSysPublishRequest) Descriptor

func (*NameSysPublishRequest) Descriptor() ([]byte, []int)

func (*NameSysPublishRequest) GetEol

func (m *NameSysPublishRequest) GetEol() int32

func (*NameSysPublishRequest) GetPrivateKey

func (m *NameSysPublishRequest) GetPrivateKey() []byte

func (*NameSysPublishRequest) GetTtl

func (m *NameSysPublishRequest) GetTtl() int32

func (*NameSysPublishRequest) GetValue

func (m *NameSysPublishRequest) GetValue() string

func (*NameSysPublishRequest) Marshal

func (m *NameSysPublishRequest) Marshal() (dAtA []byte, err error)

func (*NameSysPublishRequest) MarshalTo

func (m *NameSysPublishRequest) MarshalTo(dAtA []byte) (int, error)

func (*NameSysPublishRequest) MarshalToSizedBuffer

func (m *NameSysPublishRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NameSysPublishRequest) ProtoMessage

func (*NameSysPublishRequest) ProtoMessage()

func (*NameSysPublishRequest) Reset

func (m *NameSysPublishRequest) Reset()

func (*NameSysPublishRequest) Size

func (m *NameSysPublishRequest) Size() (n int)

func (*NameSysPublishRequest) String

func (m *NameSysPublishRequest) String() string

func (*NameSysPublishRequest) Unmarshal

func (m *NameSysPublishRequest) Unmarshal(dAtA []byte) error

func (*NameSysPublishRequest) XXX_DiscardUnknown

func (m *NameSysPublishRequest) XXX_DiscardUnknown()

func (*NameSysPublishRequest) XXX_Marshal

func (m *NameSysPublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NameSysPublishRequest) XXX_Merge

func (m *NameSysPublishRequest) XXX_Merge(src proto.Message)

func (*NameSysPublishRequest) XXX_Size

func (m *NameSysPublishRequest) XXX_Size() int

func (*NameSysPublishRequest) XXX_Unmarshal

func (m *NameSysPublishRequest) XXX_Unmarshal(b []byte) error

type NameSysResolveRequest

type NameSysResolveRequest struct {
	// the name to resolve
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// recursion depth limit
	Depth uint32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
	// number of ipns records to retrieve
	// before selecting the best record
	DhtRecordCount uint32 `protobuf:"varint,3,opt,name=dhtRecordCount,proto3" json:"dhtRecordCount,omitempty"`
	// the amount of time to wait
	// for records to be fetched and verified
	DhtTimeout int32 `protobuf:"varint,4,opt,name=dhtTimeout,proto3" json:"dhtTimeout,omitempty"`
}

NameSysResolveRequest is used to resolve an IPNS name

func (*NameSysResolveRequest) Descriptor

func (*NameSysResolveRequest) Descriptor() ([]byte, []int)

func (*NameSysResolveRequest) GetDepth

func (m *NameSysResolveRequest) GetDepth() uint32

func (*NameSysResolveRequest) GetDhtRecordCount

func (m *NameSysResolveRequest) GetDhtRecordCount() uint32

func (*NameSysResolveRequest) GetDhtTimeout

func (m *NameSysResolveRequest) GetDhtTimeout() int32

func (*NameSysResolveRequest) GetName

func (m *NameSysResolveRequest) GetName() string

func (*NameSysResolveRequest) Marshal

func (m *NameSysResolveRequest) Marshal() (dAtA []byte, err error)

func (*NameSysResolveRequest) MarshalTo

func (m *NameSysResolveRequest) MarshalTo(dAtA []byte) (int, error)

func (*NameSysResolveRequest) MarshalToSizedBuffer

func (m *NameSysResolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NameSysResolveRequest) ProtoMessage

func (*NameSysResolveRequest) ProtoMessage()

func (*NameSysResolveRequest) Reset

func (m *NameSysResolveRequest) Reset()

func (*NameSysResolveRequest) Size

func (m *NameSysResolveRequest) Size() (n int)

func (*NameSysResolveRequest) String

func (m *NameSysResolveRequest) String() string

func (*NameSysResolveRequest) Unmarshal

func (m *NameSysResolveRequest) Unmarshal(dAtA []byte) error

func (*NameSysResolveRequest) XXX_DiscardUnknown

func (m *NameSysResolveRequest) XXX_DiscardUnknown()

func (*NameSysResolveRequest) XXX_Marshal

func (m *NameSysResolveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NameSysResolveRequest) XXX_Merge

func (m *NameSysResolveRequest) XXX_Merge(src proto.Message)

func (*NameSysResolveRequest) XXX_Size

func (m *NameSysResolveRequest) XXX_Size() int

func (*NameSysResolveRequest) XXX_Unmarshal

func (m *NameSysResolveRequest) XXX_Unmarshal(b []byte) error

type NameSysResolveResult

type NameSysResolveResult struct {
	// the path that was resolved
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// an error if any
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}

NameSysResolveRequest is an answer to a resolve request

func (*NameSysResolveResult) Descriptor

func (*NameSysResolveResult) Descriptor() ([]byte, []int)

func (*NameSysResolveResult) GetError

func (m *NameSysResolveResult) GetError() string

func (*NameSysResolveResult) GetPath

func (m *NameSysResolveResult) GetPath() string

func (*NameSysResolveResult) Marshal

func (m *NameSysResolveResult) Marshal() (dAtA []byte, err error)

func (*NameSysResolveResult) MarshalTo

func (m *NameSysResolveResult) MarshalTo(dAtA []byte) (int, error)

func (*NameSysResolveResult) MarshalToSizedBuffer

func (m *NameSysResolveResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NameSysResolveResult) ProtoMessage

func (*NameSysResolveResult) ProtoMessage()

func (*NameSysResolveResult) Reset

func (m *NameSysResolveResult) Reset()

func (*NameSysResolveResult) Size

func (m *NameSysResolveResult) Size() (n int)

func (*NameSysResolveResult) String

func (m *NameSysResolveResult) String() string

func (*NameSysResolveResult) Unmarshal

func (m *NameSysResolveResult) Unmarshal(dAtA []byte) error

func (*NameSysResolveResult) XXX_DiscardUnknown

func (m *NameSysResolveResult) XXX_DiscardUnknown()

func (*NameSysResolveResult) XXX_Marshal

func (m *NameSysResolveResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NameSysResolveResult) XXX_Merge

func (m *NameSysResolveResult) XXX_Merge(src proto.Message)

func (*NameSysResolveResult) XXX_Size

func (m *NameSysResolveResult) XXX_Size() int

func (*NameSysResolveResult) XXX_Unmarshal

func (m *NameSysResolveResult) XXX_Unmarshal(b []byte) error

type NodeAPIClient

type NodeAPIClient interface {
	// ConnMgmt provides control over libp2p connections
	ConnMgmt(ctx context.Context, in *ConnMgmtRequest, opts ...grpc.CallOption) (*ConnMgmtResponse, error)
	// Extras provide control over node extras capabilities
	Extras(ctx context.Context, in *ExtrasRequest, opts ...grpc.CallOption) (*Empty, error)
	// P2P allows control of generalized p2p streams for tcp/udp based protocol.
	// By using this RPC, we can tunnel traffic similar to ssh tunneling
	// except using libp2p as the transport layer, and and tcp/udp port.
	P2P(ctx context.Context, in *P2PRequest, opts ...grpc.CallOption) (*P2PResponse, error)
	// Blockstore allows low-level management of the underlying blockstore
	Blockstore(ctx context.Context, in *BlockstoreRequest, opts ...grpc.CallOption) (*BlockstoreResponse, error)
	// BlockstoreStream is akin to Blockstore, except streamable
	// Once v4 is out, condense this + blockstore into a single call
	BlockstoreStream(ctx context.Context, opts ...grpc.CallOption) (NodeAPI_BlockstoreStreamClient, error)
	// Dag is a unidirectional rpc allowing manipulation of low-level ipld objects
	Dag(ctx context.Context, in *DagRequest, opts ...grpc.CallOption) (*DagResponse, error)
	// Keystore is a unidirectional RPC allowing management of ipfs keystores
	Keystore(ctx context.Context, in *KeystoreRequest, opts ...grpc.CallOption) (*KeystoreResponse, error)
	// Persist is used to retrieve data from the network and make it available locally
	Persist(ctx context.Context, in *PersistRequest, opts ...grpc.CallOption) (*PersistResponse, error)
}

NodeAPIClient is the client API for NodeAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewNodeAPIClient

func NewNodeAPIClient(cc *grpc.ClientConn) NodeAPIClient

type NodeAPIServer

type NodeAPIServer interface {
	// ConnMgmt provides control over libp2p connections
	ConnMgmt(context.Context, *ConnMgmtRequest) (*ConnMgmtResponse, error)
	// Extras provide control over node extras capabilities
	Extras(context.Context, *ExtrasRequest) (*Empty, error)
	// P2P allows control of generalized p2p streams for tcp/udp based protocol.
	// By using this RPC, we can tunnel traffic similar to ssh tunneling
	// except using libp2p as the transport layer, and and tcp/udp port.
	P2P(context.Context, *P2PRequest) (*P2PResponse, error)
	// Blockstore allows low-level management of the underlying blockstore
	Blockstore(context.Context, *BlockstoreRequest) (*BlockstoreResponse, error)
	// BlockstoreStream is akin to Blockstore, except streamable
	// Once v4 is out, condense this + blockstore into a single call
	BlockstoreStream(NodeAPI_BlockstoreStreamServer) error
	// Dag is a unidirectional rpc allowing manipulation of low-level ipld objects
	Dag(context.Context, *DagRequest) (*DagResponse, error)
	// Keystore is a unidirectional RPC allowing management of ipfs keystores
	Keystore(context.Context, *KeystoreRequest) (*KeystoreResponse, error)
	// Persist is used to retrieve data from the network and make it available locally
	Persist(context.Context, *PersistRequest) (*PersistResponse, error)
}

NodeAPIServer is the server API for NodeAPI service.

type NodeAPI_BlockstoreStreamClient added in v3.2.1

type NodeAPI_BlockstoreStreamClient interface {
	Send(*BlockstoreRequest) error
	Recv() (*BlockstoreResponse, error)
	grpc.ClientStream
}

type NodeAPI_BlockstoreStreamServer added in v3.2.1

type NodeAPI_BlockstoreStreamServer interface {
	Send(*BlockstoreResponse) error
	Recv() (*BlockstoreRequest, error)
	grpc.ServerStream
}

type P2PLsInfo

type P2PLsInfo struct {
	ProtocolName  string `protobuf:"bytes,1,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
	ListenAddress string `protobuf:"bytes,2,opt,name=listenAddress,proto3" json:"listenAddress,omitempty"`
	TargetAddress string `protobuf:"bytes,3,opt,name=targetAddress,proto3" json:"targetAddress,omitempty"`
	// indicates whether or not this is a p2p listener or local listener
	Local bool `protobuf:"varint,4,opt,name=local,proto3" json:"local,omitempty"`
}

P2PLsInfo contains information about a single p2p stream

func (*P2PLsInfo) Descriptor

func (*P2PLsInfo) Descriptor() ([]byte, []int)

func (*P2PLsInfo) GetListenAddress

func (m *P2PLsInfo) GetListenAddress() string

func (*P2PLsInfo) GetLocal

func (m *P2PLsInfo) GetLocal() bool

func (*P2PLsInfo) GetProtocolName

func (m *P2PLsInfo) GetProtocolName() string

func (*P2PLsInfo) GetTargetAddress

func (m *P2PLsInfo) GetTargetAddress() string

func (*P2PLsInfo) Marshal

func (m *P2PLsInfo) Marshal() (dAtA []byte, err error)

func (*P2PLsInfo) MarshalTo

func (m *P2PLsInfo) MarshalTo(dAtA []byte) (int, error)

func (*P2PLsInfo) MarshalToSizedBuffer

func (m *P2PLsInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*P2PLsInfo) ProtoMessage

func (*P2PLsInfo) ProtoMessage()

func (*P2PLsInfo) Reset

func (m *P2PLsInfo) Reset()

func (*P2PLsInfo) Size

func (m *P2PLsInfo) Size() (n int)

func (*P2PLsInfo) String

func (m *P2PLsInfo) String() string

func (*P2PLsInfo) Unmarshal

func (m *P2PLsInfo) Unmarshal(dAtA []byte) error

func (*P2PLsInfo) XXX_DiscardUnknown

func (m *P2PLsInfo) XXX_DiscardUnknown()

func (*P2PLsInfo) XXX_Marshal

func (m *P2PLsInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*P2PLsInfo) XXX_Merge

func (m *P2PLsInfo) XXX_Merge(src proto.Message)

func (*P2PLsInfo) XXX_Size

func (m *P2PLsInfo) XXX_Size() int

func (*P2PLsInfo) XXX_Unmarshal

func (m *P2PLsInfo) XXX_Unmarshal(b []byte) error

type P2PREQTYPE

type P2PREQTYPE int32

P2PREQTYPE denotes the particular type of request being used in the p2p rpc

const (
	// equivalent of ipfs p2p close
	P2PREQTYPE_CLOSE P2PREQTYPE = 0
	// equivalent of ipfs p2p forward
	P2PREQTYPE_FORWARD P2PREQTYPE = 1
	// equivalent of ipfs p2p listen
	P2PREQTYPE_LISTEN P2PREQTYPE = 2
	// equivalent of ipfs p2p ls
	P2PREQTYPE_LS P2PREQTYPE = 3
)

func (P2PREQTYPE) EnumDescriptor

func (P2PREQTYPE) EnumDescriptor() ([]byte, []int)

func (P2PREQTYPE) String

func (x P2PREQTYPE) String() string

type P2PRequest

type P2PRequest struct {
	// indicates the request type
	RequestType P2PREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.P2PREQTYPE" json:"requestType,omitempty"`
	// used by: P2PREQTYPE.CLOSE
	All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"`
	// used by: P2PREQTYPE.LS
	Verbose bool `protobuf:"varint,3,opt,name=verbose,proto3" json:"verbose,omitempty"`
	// used by: P2PREQTYPE.CLOSE, P2PREQTYPE.FORWARD, P2PREQTYPE.LISTEN
	ProtocolName string `protobuf:"bytes,4,opt,name=protocolName,proto3" json:"protocolName,omitempty"`
	// used by: P2PREQTYPE.CLOSE, P2PREQTYPE.FORWARD
	// must be specified as a multiaddr
	ListenAddress string `protobuf:"bytes,5,opt,name=listenAddress,proto3" json:"listenAddress,omitempty"`
	// used by: P2PREQTYPE.CLOSE, P2PREQTYPE.FORWARD
	// must be specified as a multiaddr
	TargetAddress string `protobuf:"bytes,6,opt,name=targetAddress,proto3" json:"targetAddress,omitempty"`
	// used by: P2PREQTYPE.LISTEN
	// must be specified as a multiaddr
	RemoteAddress string `protobuf:"bytes,7,opt,name=remoteAddress,proto3" json:"remoteAddress,omitempty"`
	// used by: P2PREQTYPE.LISTEN, P2PREQTYPE.FORWARD
	AllowCustomProtocols bool `protobuf:"varint,8,opt,name=allowCustomProtocols,proto3" json:"allowCustomProtocols,omitempty"`
	// used by: P2PREQTYPE.LISTEN
	ReportPeerID bool `protobuf:"varint,9,opt,name=reportPeerID,proto3" json:"reportPeerID,omitempty"`
}

P2PRequest is a request message holding the details of a particular P2P rpc call

func (*P2PRequest) Descriptor

func (*P2PRequest) Descriptor() ([]byte, []int)

func (*P2PRequest) GetAll

func (m *P2PRequest) GetAll() bool

func (*P2PRequest) GetAllowCustomProtocols

func (m *P2PRequest) GetAllowCustomProtocols() bool

func (*P2PRequest) GetListenAddress

func (m *P2PRequest) GetListenAddress() string

func (*P2PRequest) GetProtocolName

func (m *P2PRequest) GetProtocolName() string

func (*P2PRequest) GetRemoteAddress

func (m *P2PRequest) GetRemoteAddress() string

func (*P2PRequest) GetReportPeerID

func (m *P2PRequest) GetReportPeerID() bool

func (*P2PRequest) GetRequestType

func (m *P2PRequest) GetRequestType() P2PREQTYPE

func (*P2PRequest) GetTargetAddress

func (m *P2PRequest) GetTargetAddress() string

func (*P2PRequest) GetVerbose

func (m *P2PRequest) GetVerbose() bool

func (*P2PRequest) Marshal

func (m *P2PRequest) Marshal() (dAtA []byte, err error)

func (*P2PRequest) MarshalTo

func (m *P2PRequest) MarshalTo(dAtA []byte) (int, error)

func (*P2PRequest) MarshalToSizedBuffer

func (m *P2PRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*P2PRequest) ProtoMessage

func (*P2PRequest) ProtoMessage()

func (*P2PRequest) Reset

func (m *P2PRequest) Reset()

func (*P2PRequest) Size

func (m *P2PRequest) Size() (n int)

func (*P2PRequest) String

func (m *P2PRequest) String() string

func (*P2PRequest) Unmarshal

func (m *P2PRequest) Unmarshal(dAtA []byte) error

func (*P2PRequest) XXX_DiscardUnknown

func (m *P2PRequest) XXX_DiscardUnknown()

func (*P2PRequest) XXX_Marshal

func (m *P2PRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*P2PRequest) XXX_Merge

func (m *P2PRequest) XXX_Merge(src proto.Message)

func (*P2PRequest) XXX_Size

func (m *P2PRequest) XXX_Size() int

func (*P2PRequest) XXX_Unmarshal

func (m *P2PRequest) XXX_Unmarshal(b []byte) error

type P2PResponse

type P2PResponse struct {
	RequestType P2PREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.P2PREQTYPE" json:"requestType,omitempty"`
	// sent by: P2PREQTYPE.LISTEN
	Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
	// sent by: P2PREQTYPE.CLOSE to indicate the number of connections closed
	ConnsClosed int32 `protobuf:"varint,3,opt,name=connsClosed,proto3" json:"connsClosed,omitempty"`
	// sent by: P2PREQTYPE.LS and contains all known stream information
	StreamInfos []*P2PLsInfo `protobuf:"bytes,4,rep,name=streamInfos,proto3" json:"streamInfos,omitempty"`
}

P2PResponse is a response message sent in response to a P2PRequest message

func (*P2PResponse) Descriptor

func (*P2PResponse) Descriptor() ([]byte, []int)

func (*P2PResponse) GetConnsClosed

func (m *P2PResponse) GetConnsClosed() int32

func (*P2PResponse) GetNames

func (m *P2PResponse) GetNames() []string

func (*P2PResponse) GetRequestType

func (m *P2PResponse) GetRequestType() P2PREQTYPE

func (*P2PResponse) GetStreamInfos

func (m *P2PResponse) GetStreamInfos() []*P2PLsInfo

func (*P2PResponse) Marshal

func (m *P2PResponse) Marshal() (dAtA []byte, err error)

func (*P2PResponse) MarshalTo

func (m *P2PResponse) MarshalTo(dAtA []byte) (int, error)

func (*P2PResponse) MarshalToSizedBuffer

func (m *P2PResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*P2PResponse) ProtoMessage

func (*P2PResponse) ProtoMessage()

func (*P2PResponse) Reset

func (m *P2PResponse) Reset()

func (*P2PResponse) Size

func (m *P2PResponse) Size() (n int)

func (*P2PResponse) String

func (m *P2PResponse) String() string

func (*P2PResponse) Unmarshal

func (m *P2PResponse) Unmarshal(dAtA []byte) error

func (*P2PResponse) XXX_DiscardUnknown

func (m *P2PResponse) XXX_DiscardUnknown()

func (*P2PResponse) XXX_Marshal

func (m *P2PResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*P2PResponse) XXX_Merge

func (m *P2PResponse) XXX_Merge(src proto.Message)

func (*P2PResponse) XXX_Size

func (m *P2PResponse) XXX_Size() int

func (*P2PResponse) XXX_Unmarshal

func (m *P2PResponse) XXX_Unmarshal(b []byte) error

type PSREQTYPE

type PSREQTYPE int32

PSREQTYPE indicates the particular PubSubAPI request being performed

const (
	// PS_GET_TOPICS is used to return a list of subscribed pubsub topics
	PSREQTYPE_PS_GET_TOPICS PSREQTYPE = 0
	// PS_LIST_PEERS is used to return a list of peers subscribed to topics we are subscribed to
	PSREQTYPE_PS_LIST_PEERS PSREQTYPE = 1
	// PS_SUBSCRIBE is used to establish a persistent subscription to a pubsub topic
	PSREQTYPE_PS_SUBSCRIBE PSREQTYPE = 2
	// PS_PUBLISH is used to publisbh a message to a pubsub topic
	PSREQTYPE_PS_PUBLISH PSREQTYPE = 3
)

func (PSREQTYPE) EnumDescriptor

func (PSREQTYPE) EnumDescriptor() ([]byte, []int)

func (PSREQTYPE) String

func (x PSREQTYPE) String() string

type PersistRequest

type PersistRequest struct {
	// cids to persist locally
	Cids []string `protobuf:"bytes,1,rep,name=cids,proto3" json:"cids,omitempty"`
}

func (*PersistRequest) Descriptor

func (*PersistRequest) Descriptor() ([]byte, []int)

func (*PersistRequest) GetCids

func (m *PersistRequest) GetCids() []string

func (*PersistRequest) Marshal

func (m *PersistRequest) Marshal() (dAtA []byte, err error)

func (*PersistRequest) MarshalTo

func (m *PersistRequest) MarshalTo(dAtA []byte) (int, error)

func (*PersistRequest) MarshalToSizedBuffer

func (m *PersistRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PersistRequest) ProtoMessage

func (*PersistRequest) ProtoMessage()

func (*PersistRequest) Reset

func (m *PersistRequest) Reset()

func (*PersistRequest) Size

func (m *PersistRequest) Size() (n int)

func (*PersistRequest) String

func (m *PersistRequest) String() string

func (*PersistRequest) Unmarshal

func (m *PersistRequest) Unmarshal(dAtA []byte) error

func (*PersistRequest) XXX_DiscardUnknown

func (m *PersistRequest) XXX_DiscardUnknown()

func (*PersistRequest) XXX_Marshal

func (m *PersistRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PersistRequest) XXX_Merge

func (m *PersistRequest) XXX_Merge(src proto.Message)

func (*PersistRequest) XXX_Size

func (m *PersistRequest) XXX_Size() int

func (*PersistRequest) XXX_Unmarshal

func (m *PersistRequest) XXX_Unmarshal(b []byte) error

type PersistResponse

type PersistResponse struct {
	// key = cid, value = whether or not it was persisted
	Status map[string]bool `` /* 154-byte string literal not displayed */
	// key = cid, value = error if not persisted
	Errors map[string]string `` /* 153-byte string literal not displayed */
}

func (*PersistResponse) Descriptor

func (*PersistResponse) Descriptor() ([]byte, []int)

func (*PersistResponse) GetErrors

func (m *PersistResponse) GetErrors() map[string]string

func (*PersistResponse) GetStatus

func (m *PersistResponse) GetStatus() map[string]bool

func (*PersistResponse) Marshal

func (m *PersistResponse) Marshal() (dAtA []byte, err error)

func (*PersistResponse) MarshalTo

func (m *PersistResponse) MarshalTo(dAtA []byte) (int, error)

func (*PersistResponse) MarshalToSizedBuffer

func (m *PersistResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PersistResponse) ProtoMessage

func (*PersistResponse) ProtoMessage()

func (*PersistResponse) Reset

func (m *PersistResponse) Reset()

func (*PersistResponse) Size

func (m *PersistResponse) Size() (n int)

func (*PersistResponse) String

func (m *PersistResponse) String() string

func (*PersistResponse) Unmarshal

func (m *PersistResponse) Unmarshal(dAtA []byte) error

func (*PersistResponse) XXX_DiscardUnknown

func (m *PersistResponse) XXX_DiscardUnknown()

func (*PersistResponse) XXX_Marshal

func (m *PersistResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PersistResponse) XXX_Merge

func (m *PersistResponse) XXX_Merge(src proto.Message)

func (*PersistResponse) XXX_Size

func (m *PersistResponse) XXX_Size() int

func (*PersistResponse) XXX_Unmarshal

func (m *PersistResponse) XXX_Unmarshal(b []byte) error

type PubSubAPIClient

type PubSubAPIClient interface {
	// PubSub allows controlling libp2p pubsub topics and subscriptions using
	// a bidirectional streaming API
	PubSub(ctx context.Context, opts ...grpc.CallOption) (PubSubAPI_PubSubClient, error)
}

PubSubAPIClient is the client API for PubSubAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPubSubAPIClient

func NewPubSubAPIClient(cc *grpc.ClientConn) PubSubAPIClient

type PubSubAPIServer

type PubSubAPIServer interface {
	// PubSub allows controlling libp2p pubsub topics and subscriptions using
	// a bidirectional streaming API
	PubSub(PubSubAPI_PubSubServer) error
}

PubSubAPIServer is the server API for PubSubAPI service.

type PubSubAPI_PubSubClient

type PubSubAPI_PubSubClient interface {
	Send(*PubSubRequest) error
	Recv() (*PubSubResponse, error)
	grpc.ClientStream
}

type PubSubAPI_PubSubServer

type PubSubAPI_PubSubServer interface {
	Send(*PubSubResponse) error
	Recv() (*PubSubRequest, error)
	grpc.ServerStream
}

type PubSubMessage

type PubSubMessage struct {
	// who this message is from
	From []byte `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	// the data of this message
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// the sequence number of this message
	Seqno []byte `protobuf:"bytes,3,opt,name=seqno,proto3" json:"seqno,omitempty"`
	// the topic IDs this message is sent to
	TopicIDs []string `protobuf:"bytes,4,rep,name=topicIDs,proto3" json:"topicIDs,omitempty"`
	// the signature of the sender
	Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// the key of the sender
	Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
}

func (*PubSubMessage) Descriptor

func (*PubSubMessage) Descriptor() ([]byte, []int)

func (*PubSubMessage) GetData

func (m *PubSubMessage) GetData() []byte

func (*PubSubMessage) GetFrom

func (m *PubSubMessage) GetFrom() []byte

func (*PubSubMessage) GetKey

func (m *PubSubMessage) GetKey() []byte

func (*PubSubMessage) GetSeqno

func (m *PubSubMessage) GetSeqno() []byte

func (*PubSubMessage) GetSignature

func (m *PubSubMessage) GetSignature() []byte

func (*PubSubMessage) GetTopicIDs

func (m *PubSubMessage) GetTopicIDs() []string

func (*PubSubMessage) Marshal

func (m *PubSubMessage) Marshal() (dAtA []byte, err error)

func (*PubSubMessage) MarshalTo

func (m *PubSubMessage) MarshalTo(dAtA []byte) (int, error)

func (*PubSubMessage) MarshalToSizedBuffer

func (m *PubSubMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PubSubMessage) ProtoMessage

func (*PubSubMessage) ProtoMessage()

func (*PubSubMessage) Reset

func (m *PubSubMessage) Reset()

func (*PubSubMessage) Size

func (m *PubSubMessage) Size() (n int)

func (*PubSubMessage) String

func (m *PubSubMessage) String() string

func (*PubSubMessage) Unmarshal

func (m *PubSubMessage) Unmarshal(dAtA []byte) error

func (*PubSubMessage) XXX_DiscardUnknown

func (m *PubSubMessage) XXX_DiscardUnknown()

func (*PubSubMessage) XXX_Marshal

func (m *PubSubMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubSubMessage) XXX_Merge

func (m *PubSubMessage) XXX_Merge(src proto.Message)

func (*PubSubMessage) XXX_Size

func (m *PubSubMessage) XXX_Size() int

func (*PubSubMessage) XXX_Unmarshal

func (m *PubSubMessage) XXX_Unmarshal(b []byte) error

type PubSubPeer

type PubSubPeer struct {
	// the topic this peer belongs to
	Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	// the id of this peer
	PeerID string `protobuf:"bytes,2,opt,name=peerID,proto3" json:"peerID,omitempty"`
}

represents an individual pubsub peer

func (*PubSubPeer) Descriptor

func (*PubSubPeer) Descriptor() ([]byte, []int)

func (*PubSubPeer) GetPeerID

func (m *PubSubPeer) GetPeerID() string

func (*PubSubPeer) GetTopic

func (m *PubSubPeer) GetTopic() string

func (*PubSubPeer) Marshal

func (m *PubSubPeer) Marshal() (dAtA []byte, err error)

func (*PubSubPeer) MarshalTo

func (m *PubSubPeer) MarshalTo(dAtA []byte) (int, error)

func (*PubSubPeer) MarshalToSizedBuffer

func (m *PubSubPeer) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PubSubPeer) ProtoMessage

func (*PubSubPeer) ProtoMessage()

func (*PubSubPeer) Reset

func (m *PubSubPeer) Reset()

func (*PubSubPeer) Size

func (m *PubSubPeer) Size() (n int)

func (*PubSubPeer) String

func (m *PubSubPeer) String() string

func (*PubSubPeer) Unmarshal

func (m *PubSubPeer) Unmarshal(dAtA []byte) error

func (*PubSubPeer) XXX_DiscardUnknown

func (m *PubSubPeer) XXX_DiscardUnknown()

func (*PubSubPeer) XXX_Marshal

func (m *PubSubPeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubSubPeer) XXX_Merge

func (m *PubSubPeer) XXX_Merge(src proto.Message)

func (*PubSubPeer) XXX_Size

func (m *PubSubPeer) XXX_Size() int

func (*PubSubPeer) XXX_Unmarshal

func (m *PubSubPeer) XXX_Unmarshal(b []byte) error

type PubSubRequest

type PubSubRequest struct {
	// indicates the particular PubSubAPI request being performed
	RequestType PSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.PSREQTYPE" json:"requestType,omitempty"`
	// topics to request peers from, or publish data to
	// sent by: PS_LIST_PEERS, PS_SUBSCRIBE, PS_PUBLISH
	Topics []string `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
	// data to sent to topics
	// sent by: PS_PUBLISH
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}

func (*PubSubRequest) Descriptor

func (*PubSubRequest) Descriptor() ([]byte, []int)

func (*PubSubRequest) GetData

func (m *PubSubRequest) GetData() []byte

func (*PubSubRequest) GetRequestType

func (m *PubSubRequest) GetRequestType() PSREQTYPE

func (*PubSubRequest) GetTopics

func (m *PubSubRequest) GetTopics() []string

func (*PubSubRequest) Marshal

func (m *PubSubRequest) Marshal() (dAtA []byte, err error)

func (*PubSubRequest) MarshalTo

func (m *PubSubRequest) MarshalTo(dAtA []byte) (int, error)

func (*PubSubRequest) MarshalToSizedBuffer

func (m *PubSubRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PubSubRequest) ProtoMessage

func (*PubSubRequest) ProtoMessage()

func (*PubSubRequest) Reset

func (m *PubSubRequest) Reset()

func (*PubSubRequest) Size

func (m *PubSubRequest) Size() (n int)

func (*PubSubRequest) String

func (m *PubSubRequest) String() string

func (*PubSubRequest) Unmarshal

func (m *PubSubRequest) Unmarshal(dAtA []byte) error

func (*PubSubRequest) XXX_DiscardUnknown

func (m *PubSubRequest) XXX_DiscardUnknown()

func (*PubSubRequest) XXX_Marshal

func (m *PubSubRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubSubRequest) XXX_Merge

func (m *PubSubRequest) XXX_Merge(src proto.Message)

func (*PubSubRequest) XXX_Size

func (m *PubSubRequest) XXX_Size() int

func (*PubSubRequest) XXX_Unmarshal

func (m *PubSubRequest) XXX_Unmarshal(b []byte) error

type PubSubResponse

type PubSubResponse struct {
	// indicates the particular PubSubAPI request being performed
	RequestType PSREQTYPE `protobuf:"varint,1,opt,name=requestType,proto3,enum=pb.PSREQTYPE" json:"requestType,omitempty"`
	// messages we have received from a topic
	// sent by: PS_SUBSCRIBE
	Message []*PubSubMessage `protobuf:"bytes,2,rep,name=message,proto3" json:"message,omitempty"`
	// topic names
	// sent by: PS_GET_TOPICS
	Topics []string `protobuf:"bytes,3,rep,name=topics,proto3" json:"topics,omitempty"`
	// pubsub peers
	// sent by: PS_LIST_PEERS
	Peers []*PubSubPeer `protobuf:"bytes,4,rep,name=peers,proto3" json:"peers,omitempty"`
}

func (*PubSubResponse) Descriptor

func (*PubSubResponse) Descriptor() ([]byte, []int)

func (*PubSubResponse) GetMessage

func (m *PubSubResponse) GetMessage() []*PubSubMessage

func (*PubSubResponse) GetPeers

func (m *PubSubResponse) GetPeers() []*PubSubPeer

func (*PubSubResponse) GetRequestType

func (m *PubSubResponse) GetRequestType() PSREQTYPE

func (*PubSubResponse) GetTopics

func (m *PubSubResponse) GetTopics() []string

func (*PubSubResponse) Marshal

func (m *PubSubResponse) Marshal() (dAtA []byte, err error)

func (*PubSubResponse) MarshalTo

func (m *PubSubResponse) MarshalTo(dAtA []byte) (int, error)

func (*PubSubResponse) MarshalToSizedBuffer

func (m *PubSubResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PubSubResponse) ProtoMessage

func (*PubSubResponse) ProtoMessage()

func (*PubSubResponse) Reset

func (m *PubSubResponse) Reset()

func (*PubSubResponse) Size

func (m *PubSubResponse) Size() (n int)

func (*PubSubResponse) String

func (m *PubSubResponse) String() string

func (*PubSubResponse) Unmarshal

func (m *PubSubResponse) Unmarshal(dAtA []byte) error

func (*PubSubResponse) XXX_DiscardUnknown

func (m *PubSubResponse) XXX_DiscardUnknown()

func (*PubSubResponse) XXX_Marshal

func (m *PubSubResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PubSubResponse) XXX_Merge

func (m *PubSubResponse) XXX_Merge(src proto.Message)

func (*PubSubResponse) XXX_Size

func (m *PubSubResponse) XXX_Size() int

func (*PubSubResponse) XXX_Unmarshal

func (m *PubSubResponse) XXX_Unmarshal(b []byte) error

type PutResponse

type PutResponse struct {
	// hash is hash/cid (content identifier) of the data that was stored
	Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
}

PutResponse is a response to any data storage (put) requests

func (*PutResponse) Descriptor

func (*PutResponse) Descriptor() ([]byte, []int)

func (*PutResponse) GetHash

func (m *PutResponse) GetHash() string

func (*PutResponse) Marshal

func (m *PutResponse) Marshal() (dAtA []byte, err error)

func (*PutResponse) MarshalTo

func (m *PutResponse) MarshalTo(dAtA []byte) (int, error)

func (*PutResponse) MarshalToSizedBuffer

func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset

func (m *PutResponse) Reset()

func (*PutResponse) Size

func (m *PutResponse) Size() (n int)

func (*PutResponse) String

func (m *PutResponse) String() string

func (*PutResponse) Unmarshal

func (m *PutResponse) Unmarshal(dAtA []byte) error

func (*PutResponse) XXX_DiscardUnknown

func (m *PutResponse) XXX_DiscardUnknown()

func (*PutResponse) XXX_Marshal

func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PutResponse) XXX_Merge

func (m *PutResponse) XXX_Merge(src proto.Message)

func (*PutResponse) XXX_Size

func (m *PutResponse) XXX_Size() int

func (*PutResponse) XXX_Unmarshal

func (m *PutResponse) XXX_Unmarshal(b []byte) error

type REFREQOPTS

type REFREQOPTS int32

REFREQOPTS are options for fine-tuning ref count requests

const (
	REFREQOPTS_REF_FORCE REFREQOPTS = 0
)

func (REFREQOPTS) EnumDescriptor

func (REFREQOPTS) EnumDescriptor() ([]byte, []int)

func (REFREQOPTS) String

func (x REFREQOPTS) String() string

type REFREQTYPE

type REFREQTYPE int32

REFREQTYPE is used to indicate the type of ref count request being made

const (
	// REF_GET_COUNT is used to get the reference count of a particular cid
	REFREQTYPE_REF_GET_COUNT REFREQTYPE = 0
	REFREQTYPE_REF_DELETE    REFREQTYPE = 1
)

func (REFREQTYPE) EnumDescriptor

func (REFREQTYPE) EnumDescriptor() ([]byte, []int)

func (REFREQTYPE) String

func (x REFREQTYPE) String() string

type RefCountRequest

type RefCountRequest struct {
	// cids are optional cids to filter our requests by
	Cids []string `protobuf:"bytes,1,rep,name=cids,proto3" json:"cids,omitempty"`
	// can be used to apply limits to the number of store requests made, search limits, etc..
	Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
}

RefCountRequest is used to analyze the reference counter store, and retrieve usage information

func (*RefCountRequest) Descriptor

func (*RefCountRequest) Descriptor() ([]byte, []int)

func (*RefCountRequest) GetCids

func (m *RefCountRequest) GetCids() []string

func (*RefCountRequest) GetLimit

func (m *RefCountRequest) GetLimit() int64

func (*RefCountRequest) Marshal

func (m *RefCountRequest) Marshal() (dAtA []byte, err error)

func (*RefCountRequest) MarshalTo

func (m *RefCountRequest) MarshalTo(dAtA []byte) (int, error)

func (*RefCountRequest) MarshalToSizedBuffer

func (m *RefCountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RefCountRequest) ProtoMessage

func (*RefCountRequest) ProtoMessage()

func (*RefCountRequest) Reset

func (m *RefCountRequest) Reset()

func (*RefCountRequest) Size

func (m *RefCountRequest) Size() (n int)

func (*RefCountRequest) String

func (m *RefCountRequest) String() string

func (*RefCountRequest) Unmarshal

func (m *RefCountRequest) Unmarshal(dAtA []byte) error

func (*RefCountRequest) XXX_DiscardUnknown

func (m *RefCountRequest) XXX_DiscardUnknown()

func (*RefCountRequest) XXX_Marshal

func (m *RefCountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefCountRequest) XXX_Merge

func (m *RefCountRequest) XXX_Merge(src proto.Message)

func (*RefCountRequest) XXX_Size

func (m *RefCountRequest) XXX_Size() int

func (*RefCountRequest) XXX_Unmarshal

func (m *RefCountRequest) XXX_Unmarshal(b []byte) error

type RefCountResponse

type RefCountResponse struct {
	// cids is a mapping of the cid to its reference count
	Cids map[string]int64 `` /* 150-byte string literal not displayed */
}

RefCountResponse is used to return the information gathered by a RefCount rpc call.

func (*RefCountResponse) Descriptor

func (*RefCountResponse) Descriptor() ([]byte, []int)

func (*RefCountResponse) GetCids

func (m *RefCountResponse) GetCids() map[string]int64

func (*RefCountResponse) Marshal

func (m *RefCountResponse) Marshal() (dAtA []byte, err error)

func (*RefCountResponse) MarshalTo

func (m *RefCountResponse) MarshalTo(dAtA []byte) (int, error)

func (*RefCountResponse) MarshalToSizedBuffer

func (m *RefCountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RefCountResponse) ProtoMessage

func (*RefCountResponse) ProtoMessage()

func (*RefCountResponse) Reset

func (m *RefCountResponse) Reset()

func (*RefCountResponse) Size

func (m *RefCountResponse) Size() (n int)

func (*RefCountResponse) String

func (m *RefCountResponse) String() string

func (*RefCountResponse) Unmarshal

func (m *RefCountResponse) Unmarshal(dAtA []byte) error

func (*RefCountResponse) XXX_DiscardUnknown

func (m *RefCountResponse) XXX_DiscardUnknown()

func (*RefCountResponse) XXX_Marshal

func (m *RefCountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RefCountResponse) XXX_Merge

func (m *RefCountResponse) XXX_Merge(src proto.Message)

func (*RefCountResponse) XXX_Size

func (m *RefCountResponse) XXX_Size() int

func (*RefCountResponse) XXX_Unmarshal

func (m *RefCountResponse) XXX_Unmarshal(b []byte) error

type Replication added in v3.1.0

type Replication struct {
	// Header must be "rtrade-replication v0..." for development stage, this is a required security header.
	// - Avoid collision from other signed data.
	// - Allow future versions to require different validation rules.
	// Any signer must understand every header tag to sign documents.
	Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// CIDs is the list of contents to replicate.
	// Please use helper functions GetCIDs and AddCIDs for this field
	CidsBytes [][]byte `protobuf:"bytes,2,rep,name=cids_bytes,json=cidsBytes,proto3" json:"cids_bytes,omitempty"`
	// Servers list the candidate severs to replicate to, in the order of preference.
	Servers []*ServerSource `protobuf:"bytes,3,rep,name=servers,proto3" json:"servers,omitempty"`
	// replication_factor is the number of replications desired.
	ReplicationFactor int32 `protobuf:"varint,4,opt,name=replication_factor,json=replicationFactor,proto3" json:"replication_factor,omitempty"`
	// refresh_interval_seconds is the *suggested* number of seconds to wait before checking
	// if a remote server is up. The first check should be random from 0 to refresh_interval_seconds.
	// Each replicator can have it's own max_interval. A sensible default value should be used if it is 0.
	RefreshIntervalSeconds int32 `` /* 130-byte string literal not displayed */
	// server_down_delay_seconds is the number of seconds to wait after a server is down before the
	// next reserved server is requested to be active. A sensible default value should be used if it is 0.
	ServerDownDelaySeconds int32    `` /* 132-byte string literal not displayed */
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

Replication message is a signable data structure to represent a replication scheme

func NewReplication added in v3.2.0

func NewReplication() *Replication

NewReplication creates a new Replication file, with the correct header

func (*Replication) AddCIDs added in v3.1.0

func (r *Replication) AddCIDs(cids ...cid.Cid) error

AddCIDs adds CIDs to this replication, requires v1 or above, then sort and remove duplicates

func (*Replication) Descriptor added in v3.1.0

func (*Replication) Descriptor() ([]byte, []int)

func (*Replication) GetCIDs added in v3.1.0

func (r *Replication) GetCIDs() ([]cid.Cid, error)

GetCIDs returns the list of CIDs of this replication. If any errors are encountered during decoding, the first error is returned, and the returned slice will only contain good CIDs. An Error is always returned if there are no CIDs in this replication.

func (*Replication) GetCidsBytes added in v3.1.0

func (m *Replication) GetCidsBytes() [][]byte

func (*Replication) GetHeader added in v3.1.0

func (m *Replication) GetHeader() string

func (*Replication) GetHeaderString added in v3.1.0

func (r *Replication) GetHeaderString(strict bool) (string, error)

GetHeaderString returns the full header string. Returns an error if header is not valid.

If strict, then unknown extensions are not allowed.

func (*Replication) GetRefreshIntervalSeconds added in v3.1.0

func (m *Replication) GetRefreshIntervalSeconds() int32

func (*Replication) GetReplicationFactor added in v3.1.0

func (m *Replication) GetReplicationFactor() int32

func (*Replication) GetServerDownDelaySeconds added in v3.1.0

func (m *Replication) GetServerDownDelaySeconds() int32

func (*Replication) GetServers added in v3.1.0

func (m *Replication) GetServers() []*ServerSource

func (*Replication) Marshal added in v3.1.0

func (m *Replication) Marshal() (dAtA []byte, err error)

func (*Replication) MarshalTo added in v3.1.0

func (m *Replication) MarshalTo(dAtA []byte) (int, error)

func (*Replication) MarshalToSizedBuffer added in v3.1.0

func (m *Replication) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Replication) ProtoMessage added in v3.1.0

func (*Replication) ProtoMessage()

func (*Replication) Reset added in v3.1.0

func (m *Replication) Reset()

func (*Replication) Size added in v3.1.0

func (m *Replication) Size() (n int)

func (*Replication) String added in v3.1.0

func (m *Replication) String() string

func (*Replication) Unmarshal added in v3.1.0

func (m *Replication) Unmarshal(dAtA []byte) error

func (*Replication) Valid added in v3.1.0

func (r *Replication) Valid(strict bool) error

Valid checks if this is an Valid Replication file, with: - correct header (if strict, then no unknown extensions), - at least one CID, - if strict, then equal or more servers than required for replication, and - replication factor greater than 1. reports the first error found.

If strict, then invalid CIDs, Servers, and unknown protocol extensions are also not allowed.

func (*Replication) XXX_DiscardUnknown added in v3.1.0

func (m *Replication) XXX_DiscardUnknown()

func (*Replication) XXX_Marshal added in v3.1.0

func (m *Replication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Replication) XXX_Merge added in v3.1.0

func (m *Replication) XXX_Merge(src proto.Message)

func (*Replication) XXX_Size added in v3.1.0

func (m *Replication) XXX_Size() int

func (*Replication) XXX_Unmarshal added in v3.1.0

func (m *Replication) XXX_Unmarshal(b []byte) error

type ReplicationStatus added in v3.1.0

type ReplicationStatus struct {
	//ok report success for action submitted
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	//is_active report if the replication is currently active on this server
	IsActive bool `protobuf:"varint,2,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
	//current_version is the highest version this replicator/server has locally.
	CurrentVersion int64 `protobuf:"varint,3,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"`
	//target_version is the highest version this replicator/server knows about and can verify to exist.
	TargetVersion        int64    `protobuf:"varint,4,opt,name=target_version,json=targetVersion,proto3" json:"target_version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReplicationStatus) Descriptor added in v3.1.0

func (*ReplicationStatus) Descriptor() ([]byte, []int)

func (*ReplicationStatus) GetCurrentVersion added in v3.1.0

func (m *ReplicationStatus) GetCurrentVersion() int64

func (*ReplicationStatus) GetIsActive added in v3.1.0

func (m *ReplicationStatus) GetIsActive() bool

func (*ReplicationStatus) GetOk added in v3.1.0

func (m *ReplicationStatus) GetOk() bool

func (*ReplicationStatus) GetTargetVersion added in v3.1.0

func (m *ReplicationStatus) GetTargetVersion() int64

func (*ReplicationStatus) Marshal added in v3.1.0

func (m *ReplicationStatus) Marshal() (dAtA []byte, err error)

func (*ReplicationStatus) MarshalTo added in v3.1.0

func (m *ReplicationStatus) MarshalTo(dAtA []byte) (int, error)

func (*ReplicationStatus) MarshalToSizedBuffer added in v3.1.0

func (m *ReplicationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ReplicationStatus) ProtoMessage added in v3.1.0

func (*ReplicationStatus) ProtoMessage()

func (*ReplicationStatus) Reset added in v3.1.0

func (m *ReplicationStatus) Reset()

func (*ReplicationStatus) Size added in v3.1.0

func (m *ReplicationStatus) Size() (n int)

func (*ReplicationStatus) String added in v3.1.0

func (m *ReplicationStatus) String() string

func (*ReplicationStatus) Unmarshal added in v3.1.0

func (m *ReplicationStatus) Unmarshal(dAtA []byte) error

func (*ReplicationStatus) XXX_DiscardUnknown added in v3.1.0

func (m *ReplicationStatus) XXX_DiscardUnknown()

func (*ReplicationStatus) XXX_Marshal added in v3.1.0

func (m *ReplicationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReplicationStatus) XXX_Merge added in v3.1.0

func (m *ReplicationStatus) XXX_Merge(src proto.Message)

func (*ReplicationStatus) XXX_Size added in v3.1.0

func (m *ReplicationStatus) XXX_Size() int

func (*ReplicationStatus) XXX_Unmarshal added in v3.1.0

func (m *ReplicationStatus) XXX_Unmarshal(b []byte) error

type ReplicatorClient added in v3.1.0

type ReplicatorClient interface {
	// Add is used to add a replication to this server, changing it's status from reserved to active.
	Add(ctx context.Context, in *Subscription, opts ...grpc.CallOption) (Replicator_AddClient, error)
	// Status returns an updating stream of the replication status on the server.
	Status(ctx context.Context, in *Subscription, opts ...grpc.CallOption) (Replicator_StatusClient, error)
	// GetSubscriptionUpdate returns the latest version of subscribed replication
	GetSubscriptionUpdate(ctx context.Context, in *Subscription, opts ...grpc.CallOption) (*SubscriptionUpdate, error)
	// SubmitReplication is used by client agents to start replications, after they
	// have uploaded the files and retrieved the cid, and collected servers to replicate too.
	SubmitReplication(ctx context.Context, in *SignedSubscription, opts ...grpc.CallOption) (Replicator_SubmitReplicationClient, error)
}

ReplicatorClient is the client API for Replicator service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewReplicatorClient added in v3.1.0

func NewReplicatorClient(cc *grpc.ClientConn) ReplicatorClient

type ReplicatorServer added in v3.1.0

type ReplicatorServer interface {
	// Add is used to add a replication to this server, changing it's status from reserved to active.
	Add(*Subscription, Replicator_AddServer) error
	// Status returns an updating stream of the replication status on the server.
	Status(*Subscription, Replicator_StatusServer) error
	// GetSubscriptionUpdate returns the latest version of subscribed replication
	GetSubscriptionUpdate(context.Context, *Subscription) (*SubscriptionUpdate, error)
	// SubmitReplication is used by client agents to start replications, after they
	// have uploaded the files and retrieved the cid, and collected servers to replicate too.
	SubmitReplication(*SignedSubscription, Replicator_SubmitReplicationServer) error
}

ReplicatorServer is the server API for Replicator service.

type Replicator_AddClient added in v3.1.0

type Replicator_AddClient interface {
	Recv() (*ReplicationStatus, error)
	grpc.ClientStream
}

type Replicator_AddServer added in v3.1.0

type Replicator_AddServer interface {
	Send(*ReplicationStatus) error
	grpc.ServerStream
}

type Replicator_StatusClient added in v3.1.0

type Replicator_StatusClient interface {
	Recv() (*ReplicationStatus, error)
	grpc.ClientStream
}

type Replicator_StatusServer added in v3.1.0

type Replicator_StatusServer interface {
	Send(*ReplicationStatus) error
	grpc.ServerStream
}

type Replicator_SubmitReplicationClient added in v3.1.0

type Replicator_SubmitReplicationClient interface {
	Recv() (*ReplicationStatus, error)
	grpc.ClientStream
}

type Replicator_SubmitReplicationServer added in v3.1.0

type Replicator_SubmitReplicationServer interface {
	Send(*ReplicationStatus) error
	grpc.ServerStream
}

type ServerSource added in v3.1.0

type ServerSource struct {
	AddrInfo             *AddrInfo `protobuf:"bytes,1,opt,name=addr_info,json=addrInfo,proto3" json:"addr_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

ServerSource is a list of one or more servers. TODO: add field to allow referring to a list of servers from another file.

func NewServerSourceFromHost added in v3.1.0

func NewServerSourceFromHost(h HostInfo, gport int32) (*ServerSource, error)

NewServerSourceFromHost creates an ServerSource from a HostInfo

func (*ServerSource) Descriptor added in v3.1.0

func (*ServerSource) Descriptor() ([]byte, []int)

func (*ServerSource) GetAddrInfo added in v3.1.0

func (m *ServerSource) GetAddrInfo() *AddrInfo

func (*ServerSource) Marshal added in v3.1.0

func (m *ServerSource) Marshal() (dAtA []byte, err error)

func (*ServerSource) MarshalTo added in v3.1.0

func (m *ServerSource) MarshalTo(dAtA []byte) (int, error)

func (*ServerSource) MarshalToSizedBuffer added in v3.1.0

func (m *ServerSource) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerSource) ProtoMessage added in v3.1.0

func (*ServerSource) ProtoMessage()

func (*ServerSource) Reset added in v3.1.0

func (m *ServerSource) Reset()

func (*ServerSource) Size added in v3.1.0

func (m *ServerSource) Size() (n int)

func (*ServerSource) String added in v3.1.0

func (m *ServerSource) String() string

func (*ServerSource) Unmarshal added in v3.1.0

func (m *ServerSource) Unmarshal(dAtA []byte) error

func (*ServerSource) XXX_DiscardUnknown added in v3.1.0

func (m *ServerSource) XXX_DiscardUnknown()

func (*ServerSource) XXX_Marshal added in v3.1.0

func (m *ServerSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerSource) XXX_Merge added in v3.1.0

func (m *ServerSource) XXX_Merge(src proto.Message)

func (*ServerSource) XXX_Size added in v3.1.0

func (m *ServerSource) XXX_Size() int

func (*ServerSource) XXX_Unmarshal added in v3.1.0

func (m *ServerSource) XXX_Unmarshal(b []byte) error

type SignedSubscription added in v3.1.0

type SignedSubscription struct {
	SubPart              *Subscription       `protobuf:"bytes,1,opt,name=sub_part,json=subPart,proto3" json:"sub_part,omitempty"`
	UpdatePart           *SubscriptionUpdate `protobuf:"bytes,2,opt,name=update_part,json=updatePart,proto3" json:"update_part,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func NewSignedSubscription added in v3.1.0

func NewSignedSubscription(topic string, version int64, r *Replication, key libcrypto.PrivKey) (*SignedSubscription, error)

NewSignedSubscription creates a fully signed SignedSubscription with the given private key

func (*SignedSubscription) Descriptor added in v3.1.0

func (*SignedSubscription) Descriptor() ([]byte, []int)

func (*SignedSubscription) GetAuthorID added in v3.1.0

func (ss *SignedSubscription) GetAuthorID() (peer.ID, error)

GetAuthorID returns the author of the SignedSubscription, signature verification is not performed.

func (*SignedSubscription) GetOrCreateSubPart added in v3.1.0

func (ss *SignedSubscription) GetOrCreateSubPart() *Subscription

GetOrCreateSubPart creates an empty Subscription for a SignedSubscription if it does not exits. Panics if SignedSubscription is nil.

func (*SignedSubscription) GetOrCreateUpdatePart added in v3.1.0

func (ss *SignedSubscription) GetOrCreateUpdatePart() *SubscriptionUpdate

GetOrCreateUpdatePart creates an empty SubscriptionUpdate for a SignedSubscription if it does not exits. Panics if SignedSubscription is nil.

func (*SignedSubscription) GetReplication added in v3.1.0

func (ss *SignedSubscription) GetReplication() (*Replication, error)

GetReplication return the replication file from this subscription, signature verification is not performed.

func (*SignedSubscription) GetSubPart added in v3.1.0

func (m *SignedSubscription) GetSubPart() *Subscription

func (*SignedSubscription) GetTopic added in v3.1.0

func (ss *SignedSubscription) GetTopic() string

GetTopic returns the topic of the SignedSubscription

func (*SignedSubscription) GetUpdatePart added in v3.1.0

func (m *SignedSubscription) GetUpdatePart() *SubscriptionUpdate

func (*SignedSubscription) GetVersion added in v3.1.0

func (ss *SignedSubscription) GetVersion() int64

GetVersion returns the version of the SignedSubscription, signature verification is not performed.

func (*SignedSubscription) Marshal added in v3.1.0

func (m *SignedSubscription) Marshal() (dAtA []byte, err error)

func (*SignedSubscription) MarshalTo added in v3.1.0

func (m *SignedSubscription) MarshalTo(dAtA []byte) (int, error)

func (*SignedSubscription) MarshalToSizedBuffer added in v3.1.0

func (m *SignedSubscription) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignedSubscription) ProtoMessage added in v3.1.0

func (*SignedSubscription) ProtoMessage()

func (*SignedSubscription) RemoveSignature added in v3.1.0

func (ss *SignedSubscription) RemoveSignature()

RemoveSignature removes the signature from this SignedSubscription

func (*SignedSubscription) Reset added in v3.1.0

func (m *SignedSubscription) Reset()

func (*SignedSubscription) SetAuthorID added in v3.1.0

func (ss *SignedSubscription) SetAuthorID(id peer.ID) error

SetAuthorID sets the author of the SignedSubscription. If success, any old signature is removed.

func (*SignedSubscription) SetReplication added in v3.1.0

func (ss *SignedSubscription) SetReplication(r *Replication) error

SetReplication sets the replication file for this SignedSubscription. Validation is strictly performed and any old signature is removed

func (*SignedSubscription) SetTopic added in v3.1.0

func (ss *SignedSubscription) SetTopic(topic string)

SetTopic sets the topic of the SignedSubscription

func (*SignedSubscription) SetVersion added in v3.1.0

func (ss *SignedSubscription) SetVersion(v int64)

SetVersion sets the version of the SignedSubscription, and any old signature is removed.

func (*SignedSubscription) Sign added in v3.1.0

func (ss *SignedSubscription) Sign(key libcrypto.PrivKey) error

Sign signs with the given private key

func (*SignedSubscription) Size added in v3.1.0

func (m *SignedSubscription) Size() (n int)

func (*SignedSubscription) String added in v3.1.0

func (m *SignedSubscription) String() string

func (*SignedSubscription) Unmarshal added in v3.1.0

func (m *SignedSubscription) Unmarshal(dAtA []byte) error

func (*SignedSubscription) Verify added in v3.1.0

func (ss *SignedSubscription) Verify(pubkey libcrypto.PubKey, strict bool) error

Verify verifies the SignedSubscription against the provided public key.

func (*SignedSubscription) XXX_DiscardUnknown added in v3.1.0

func (m *SignedSubscription) XXX_DiscardUnknown()

func (*SignedSubscription) XXX_Marshal added in v3.1.0

func (m *SignedSubscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignedSubscription) XXX_Merge added in v3.1.0

func (m *SignedSubscription) XXX_Merge(src proto.Message)

func (*SignedSubscription) XXX_Size added in v3.1.0

func (m *SignedSubscription) XXX_Size() int

func (*SignedSubscription) XXX_Unmarshal added in v3.1.0

func (m *SignedSubscription) XXX_Unmarshal(b []byte) error

type SimpleGRPCConnectionProvider added in v3.2.0

type SimpleGRPCConnectionProvider struct {
	// contains filtered or unexported fields
}

SimpleGRPCConnectionProvider is a simple GRPCConnectionProvider

func NewSimpleConnectionProvider added in v3.2.0

func NewSimpleConnectionProvider(pk libcryto.PrivKey, addPeer AddPeer, logger *zap.Logger) (*SimpleGRPCConnectionProvider, error)

NewSimpleConnectionProvider creates a SimpleConnectionProvider

func (*SimpleGRPCConnectionProvider) ConnectionToServer added in v3.2.0

func (s *SimpleGRPCConnectionProvider) ConnectionToServer(a *AddrInfo) (*grpc.ClientConn, error)

ConnectionToServer returns grpc client connection from AddrInfo

func (*SimpleGRPCConnectionProvider) SetInitConnectionTimeout added in v3.2.4

func (s *SimpleGRPCConnectionProvider) SetInitConnectionTimeout(d time.Duration)

SetInitConnectionTimeout sets the initial connection timeout when connecting to a server. A low time out allows skipping bad servers and addresses quickly. A long timeout prevents errors during high load situations. The default timeout is 1 second.

type StatusAPIClient

type StatusAPIClient interface {
	// Version is used to retrieve api version information
	Version(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*VersionResponse, error)
	// Status is used to retrieve api status information.
	Status(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StatusResponse, error)
}

StatusAPIClient is the client API for StatusAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewStatusAPIClient

func NewStatusAPIClient(cc *grpc.ClientConn) StatusAPIClient

type StatusAPIServer

type StatusAPIServer interface {
	// Version is used to retrieve api version information
	Version(context.Context, *Empty) (*VersionResponse, error)
	// Status is used to retrieve api status information.
	Status(context.Context, *Empty) (*StatusResponse, error)
}

StatusAPIServer is the server API for StatusAPI service.

type StatusResponse

type StatusResponse struct {
	// host is an identifier for the host of the system responding to the request.
	// it may or may not be the hostname, it is up to the implementer of the service to choose what is here
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// status contains a status enum indicating the state of the system
	Status APISTATUS `protobuf:"varint,2,opt,name=status,proto3,enum=pb.APISTATUS" json:"status,omitempty"`
}

StatusResponse is used to return API status information

func (*StatusResponse) Descriptor

func (*StatusResponse) Descriptor() ([]byte, []int)

func (*StatusResponse) GetHost

func (m *StatusResponse) GetHost() string

func (*StatusResponse) GetStatus

func (m *StatusResponse) GetStatus() APISTATUS

func (*StatusResponse) Marshal

func (m *StatusResponse) Marshal() (dAtA []byte, err error)

func (*StatusResponse) MarshalTo

func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error)

func (*StatusResponse) MarshalToSizedBuffer

func (m *StatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) Size

func (m *StatusResponse) Size() (n int)

func (*StatusResponse) String

func (m *StatusResponse) String() string

func (*StatusResponse) Unmarshal

func (m *StatusResponse) Unmarshal(dAtA []byte) error

func (*StatusResponse) XXX_DiscardUnknown

func (m *StatusResponse) XXX_DiscardUnknown()

func (*StatusResponse) XXX_Marshal

func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatusResponse) XXX_Merge

func (m *StatusResponse) XXX_Merge(src proto.Message)

func (*StatusResponse) XXX_Size

func (m *StatusResponse) XXX_Size() int

func (*StatusResponse) XXX_Unmarshal

func (m *StatusResponse) XXX_Unmarshal(b []byte) error

type Subscription added in v3.1.0

type Subscription struct {
	Topic         string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
	AuthorIdBytes []byte `protobuf:"bytes,2,opt,name=author_id_bytes,json=authorIdBytes,proto3" json:"author_id_bytes,omitempty"`
	//if true, remove this Subscription.
	//For replicator.Add, deactive this replication.
	//For replicator.WaitForUpdates, stop reporting updates.
	Remove               bool     `protobuf:"varint,3,opt,name=remove,proto3" json:"remove,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Subscription) Descriptor added in v3.1.0

func (*Subscription) Descriptor() ([]byte, []int)

func (*Subscription) GetAuthorID added in v3.1.0

func (s *Subscription) GetAuthorID() (peer.ID, error)

GetAuthorID returns the author of the Subscription

func (*Subscription) GetAuthorIdBytes added in v3.1.0

func (m *Subscription) GetAuthorIdBytes() []byte

func (*Subscription) GetRemove added in v3.1.0

func (m *Subscription) GetRemove() bool

func (*Subscription) GetTopic added in v3.1.0

func (m *Subscription) GetTopic() string

func (*Subscription) Marshal added in v3.1.0

func (m *Subscription) Marshal() (dAtA []byte, err error)

func (*Subscription) MarshalTo added in v3.1.0

func (m *Subscription) MarshalTo(dAtA []byte) (int, error)

func (*Subscription) MarshalToSizedBuffer added in v3.1.0

func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Subscription) ProtoMessage added in v3.1.0

func (*Subscription) ProtoMessage()

func (*Subscription) Reset added in v3.1.0

func (m *Subscription) Reset()

func (*Subscription) SetAuthorID added in v3.1.0

func (s *Subscription) SetAuthorID(id peer.ID) error

SetAuthorID sets the author of the Subscription

func (*Subscription) Size added in v3.1.0

func (m *Subscription) Size() (n int)

func (*Subscription) String added in v3.1.0

func (m *Subscription) String() string

func (*Subscription) Unmarshal added in v3.1.0

func (m *Subscription) Unmarshal(dAtA []byte) error

func (*Subscription) XXX_DiscardUnknown added in v3.1.0

func (m *Subscription) XXX_DiscardUnknown()

func (*Subscription) XXX_Marshal added in v3.1.0

func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Subscription) XXX_Merge added in v3.1.0

func (m *Subscription) XXX_Merge(src proto.Message)

func (*Subscription) XXX_Size added in v3.1.0

func (m *Subscription) XXX_Size() int

func (*Subscription) XXX_Unmarshal added in v3.1.0

func (m *Subscription) XXX_Unmarshal(b []byte) error

type SubscriptionUpdate added in v3.1.0

type SubscriptionUpdate struct {
	//strictly increasing version number
	Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	//replication file is in bytes for signing
	ReplicationBytes []byte `protobuf:"bytes,2,opt,name=replication_bytes,json=replicationBytes,proto3" json:"replication_bytes,omitempty"`
	//signature signs the Subscription and above data in length delimited form in the order topic|author|version|replication
	Signature            []byte   `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SubscriptionUpdate) Descriptor added in v3.1.0

func (*SubscriptionUpdate) Descriptor() ([]byte, []int)

func (*SubscriptionUpdate) GetReplication added in v3.1.0

func (u *SubscriptionUpdate) GetReplication() (*Replication, error)

GetReplication return the replication file from this SubscriptionUpdate

func (*SubscriptionUpdate) GetReplicationBytes added in v3.1.0

func (m *SubscriptionUpdate) GetReplicationBytes() []byte

func (*SubscriptionUpdate) GetSignature added in v3.1.0

func (m *SubscriptionUpdate) GetSignature() []byte

func (*SubscriptionUpdate) GetVersion added in v3.1.0

func (m *SubscriptionUpdate) GetVersion() int64

func (*SubscriptionUpdate) Marshal added in v3.1.0

func (m *SubscriptionUpdate) Marshal() (dAtA []byte, err error)

func (*SubscriptionUpdate) MarshalTo added in v3.1.0

func (m *SubscriptionUpdate) MarshalTo(dAtA []byte) (int, error)

func (*SubscriptionUpdate) MarshalToSizedBuffer added in v3.1.0

func (m *SubscriptionUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SubscriptionUpdate) ProtoMessage added in v3.1.0

func (*SubscriptionUpdate) ProtoMessage()

func (*SubscriptionUpdate) RemoveSignature added in v3.1.0

func (u *SubscriptionUpdate) RemoveSignature()

RemoveSignature removes the signature from this SubscriptionUpdate

func (*SubscriptionUpdate) Reset added in v3.1.0

func (m *SubscriptionUpdate) Reset()

func (*SubscriptionUpdate) SetReplication added in v3.1.0

func (u *SubscriptionUpdate) SetReplication(r *Replication) error

SetReplication sets the replication file for this SubscriptionUpdate. Validation is strictly performed and any old signature is removed

func (*SubscriptionUpdate) Size added in v3.1.0

func (m *SubscriptionUpdate) Size() (n int)

func (*SubscriptionUpdate) String added in v3.1.0

func (m *SubscriptionUpdate) String() string

func (*SubscriptionUpdate) Unmarshal added in v3.1.0

func (m *SubscriptionUpdate) Unmarshal(dAtA []byte) error

func (*SubscriptionUpdate) XXX_DiscardUnknown added in v3.1.0

func (m *SubscriptionUpdate) XXX_DiscardUnknown()

func (*SubscriptionUpdate) XXX_Marshal added in v3.1.0

func (m *SubscriptionUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SubscriptionUpdate) XXX_Merge added in v3.1.0

func (m *SubscriptionUpdate) XXX_Merge(src proto.Message)

func (*SubscriptionUpdate) XXX_Size added in v3.1.0

func (m *SubscriptionUpdate) XXX_Size() int

func (*SubscriptionUpdate) XXX_Unmarshal added in v3.1.0

func (m *SubscriptionUpdate) XXX_Unmarshal(b []byte) error

type UnimplementedAdminAPIServer

type UnimplementedAdminAPIServer struct {
}

UnimplementedAdminAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedAdminAPIServer) ManageGC

func (*UnimplementedAdminAPIServer) RefCount

type UnimplementedFileAPIServer

type UnimplementedFileAPIServer struct {
}

UnimplementedFileAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedFileAPIServer) DownloadFile

func (*UnimplementedFileAPIServer) UploadFile

type UnimplementedNameSysAPIServer

type UnimplementedNameSysAPIServer struct {
}

UnimplementedNameSysAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedNameSysAPIServer) NameSysPublish

func (*UnimplementedNameSysAPIServer) NameSysResolve

func (*UnimplementedNameSysAPIServer) NameSysResolveAsync

type UnimplementedNodeAPIServer

type UnimplementedNodeAPIServer struct {
}

UnimplementedNodeAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedNodeAPIServer) Blockstore

func (*UnimplementedNodeAPIServer) BlockstoreStream added in v3.2.1

func (*UnimplementedNodeAPIServer) ConnMgmt

func (*UnimplementedNodeAPIServer) Dag

func (*UnimplementedNodeAPIServer) Extras

func (*UnimplementedNodeAPIServer) Keystore

func (*UnimplementedNodeAPIServer) P2P

func (*UnimplementedNodeAPIServer) Persist

type UnimplementedPubSubAPIServer

type UnimplementedPubSubAPIServer struct {
}

UnimplementedPubSubAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedPubSubAPIServer) PubSub

type UnimplementedReplicatorServer added in v3.1.0

type UnimplementedReplicatorServer struct {
}

UnimplementedReplicatorServer can be embedded to have forward compatible implementations.

func (*UnimplementedReplicatorServer) Add added in v3.1.0

func (*UnimplementedReplicatorServer) GetSubscriptionUpdate added in v3.1.0

func (*UnimplementedReplicatorServer) GetSubscriptionUpdate(ctx context.Context, req *Subscription) (*SubscriptionUpdate, error)

func (*UnimplementedReplicatorServer) Status added in v3.1.0

func (*UnimplementedReplicatorServer) SubmitReplication added in v3.1.0

type UnimplementedStatusAPIServer

type UnimplementedStatusAPIServer struct {
}

UnimplementedStatusAPIServer can be embedded to have forward compatible implementations.

func (*UnimplementedStatusAPIServer) Status

func (*UnimplementedStatusAPIServer) Version

type UploadOptions

type UploadOptions struct {
	// specifes the multihash function to use
	MultiHash string `protobuf:"bytes,1,opt,name=multiHash,proto3" json:"multiHash,omitempty"`
	// specifies the dag layout (balanced, tricklet)
	Layout string `protobuf:"bytes,2,opt,name=layout,proto3" json:"layout,omitempty"`
	// specifies the chunker type (rabin, default, etc...)
	Chunker string `protobuf:"bytes,3,opt,name=chunker,proto3" json:"chunker,omitempty"`
}

UploadOptions allows controlling the parameters of a file upload

func (*UploadOptions) Descriptor

func (*UploadOptions) Descriptor() ([]byte, []int)

func (*UploadOptions) GetChunker

func (m *UploadOptions) GetChunker() string

func (*UploadOptions) GetLayout

func (m *UploadOptions) GetLayout() string

func (*UploadOptions) GetMultiHash

func (m *UploadOptions) GetMultiHash() string

func (*UploadOptions) Marshal

func (m *UploadOptions) Marshal() (dAtA []byte, err error)

func (*UploadOptions) MarshalTo

func (m *UploadOptions) MarshalTo(dAtA []byte) (int, error)

func (*UploadOptions) MarshalToSizedBuffer

func (m *UploadOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UploadOptions) ProtoMessage

func (*UploadOptions) ProtoMessage()

func (*UploadOptions) Reset

func (m *UploadOptions) Reset()

func (*UploadOptions) Size

func (m *UploadOptions) Size() (n int)

func (*UploadOptions) String

func (m *UploadOptions) String() string

func (*UploadOptions) Unmarshal

func (m *UploadOptions) Unmarshal(dAtA []byte) error

func (*UploadOptions) XXX_DiscardUnknown

func (m *UploadOptions) XXX_DiscardUnknown()

func (*UploadOptions) XXX_Marshal

func (m *UploadOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UploadOptions) XXX_Merge

func (m *UploadOptions) XXX_Merge(src proto.Message)

func (*UploadOptions) XXX_Size

func (m *UploadOptions) XXX_Size() int

func (*UploadOptions) XXX_Unmarshal

func (m *UploadOptions) XXX_Unmarshal(b []byte) error

type UploadRequest

type UploadRequest struct {
	// blob is a single chunk of data
	Blob *Blob `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"`
	// options allows setting the optoins for this upload
	Options *UploadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
}

UploadRequest is used to upload data as a UnixFS object

func (*UploadRequest) Descriptor

func (*UploadRequest) Descriptor() ([]byte, []int)

func (*UploadRequest) GetBlob

func (m *UploadRequest) GetBlob() *Blob

func (*UploadRequest) GetOptions

func (m *UploadRequest) GetOptions() *UploadOptions

func (*UploadRequest) Marshal

func (m *UploadRequest) Marshal() (dAtA []byte, err error)

func (*UploadRequest) MarshalTo

func (m *UploadRequest) MarshalTo(dAtA []byte) (int, error)

func (*UploadRequest) MarshalToSizedBuffer

func (m *UploadRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UploadRequest) ProtoMessage

func (*UploadRequest) ProtoMessage()

func (*UploadRequest) Reset

func (m *UploadRequest) Reset()

func (*UploadRequest) Size

func (m *UploadRequest) Size() (n int)

func (*UploadRequest) String

func (m *UploadRequest) String() string

func (*UploadRequest) Unmarshal

func (m *UploadRequest) Unmarshal(dAtA []byte) error

func (*UploadRequest) XXX_DiscardUnknown

func (m *UploadRequest) XXX_DiscardUnknown()

func (*UploadRequest) XXX_Marshal

func (m *UploadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UploadRequest) XXX_Merge

func (m *UploadRequest) XXX_Merge(src proto.Message)

func (*UploadRequest) XXX_Size

func (m *UploadRequest) XXX_Size() int

func (*UploadRequest) XXX_Unmarshal

func (m *UploadRequest) XXX_Unmarshal(b []byte) error

type VersionResponse

type VersionResponse struct {
	// version denotes the github version that was present when the api was built
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
}

VersionResponse is used to return API version information

func (*VersionResponse) Descriptor

func (*VersionResponse) Descriptor() ([]byte, []int)

func (*VersionResponse) GetVersion

func (m *VersionResponse) GetVersion() string

func (*VersionResponse) Marshal

func (m *VersionResponse) Marshal() (dAtA []byte, err error)

func (*VersionResponse) MarshalTo

func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error)

func (*VersionResponse) MarshalToSizedBuffer

func (m *VersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VersionResponse) ProtoMessage

func (*VersionResponse) ProtoMessage()

func (*VersionResponse) Reset

func (m *VersionResponse) Reset()

func (*VersionResponse) Size

func (m *VersionResponse) Size() (n int)

func (*VersionResponse) String

func (m *VersionResponse) String() string

func (*VersionResponse) Unmarshal

func (m *VersionResponse) Unmarshal(dAtA []byte) error

func (*VersionResponse) XXX_DiscardUnknown

func (m *VersionResponse) XXX_DiscardUnknown()

func (*VersionResponse) XXX_Marshal

func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VersionResponse) XXX_Merge

func (m *VersionResponse) XXX_Merge(src proto.Message)

func (*VersionResponse) XXX_Size

func (m *VersionResponse) XXX_Size() int

func (*VersionResponse) XXX_Unmarshal

func (m *VersionResponse) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis
Package xtestutils provides golang testutils for developing with TemporalX
Package xtestutils provides golang testutils for developing with TemporalX

Jump to

Keyboard shortcuts

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