Documentation ¶
Index ¶
- Constants
- func AddPeer(client apiv1.DDRPv1Client, peerID string, ip string, verify bool) error
- func AddPeerContext(ctx context.Context, client apiv1.DDRPv1Client, peerID string, ip string, ...) error
- func BanPeer(client apiv1.DDRPv1Client, ip string, duration int) error
- func BanPeerContext(ctx context.Context, client apiv1.DDRPv1Client, ip string, duration int) error
- func GetBlobInfo(client apiv1.DDRPv1Client, name string) (*store.BlobInfo, error)
- func GetBlobInfoContext(ctx context.Context, client apiv1.DDRPv1Client, name string) (*store.BlobInfo, error)
- func ListBlobInfo(client apiv1.DDRPv1Client, after string, cb func(info *store.BlobInfo) bool) error
- func ListBlobInfoContext(ctx context.Context, client apiv1.DDRPv1Client, start string, ...) error
- func UnbanPeer(client apiv1.DDRPv1Client, ip string) error
- func UnbanPeerContext(ctx context.Context, client apiv1.DDRPv1Client, ip string) error
- type BlobReader
- type BlobWriter
- func (b *BlobWriter) Commit(broadcast bool) error
- func (b *BlobWriter) Open() error
- func (b *BlobWriter) Seek(offset int64, whence int) (int64, error)
- func (b *BlobWriter) Truncate() error
- func (b *BlobWriter) Write(p []byte) (int, error)
- func (b *BlobWriter) WriteAt(p []byte, off int64) (int, error)
- type Opts
- type Peer
- type Server
- func (s *Server) AddPeer(_ context.Context, req *apiv1.AddPeerReq) (*apiv1.Empty, error)
- func (s *Server) BanPeer(_ context.Context, req *apiv1.BanPeerReq) (*apiv1.Empty, error)
- func (s *Server) Checkout(ctx context.Context, req *apiv1.CheckoutReq) (*apiv1.CheckoutRes, error)
- func (s *Server) Commit(ctx context.Context, req *apiv1.CommitReq) (*apiv1.CommitRes, error)
- func (s *Server) GetBlobInfo(_ context.Context, req *apiv1.BlobInfoReq) (*apiv1.BlobInfoRes, error)
- func (s *Server) GetStatus(context.Context, *apiv1.Empty) (*apiv1.GetStatusRes, error)
- func (s *Server) ListBlobInfo(req *apiv1.ListBlobInfoReq, srv apiv1.DDRPv1_ListBlobInfoServer) error
- func (s *Server) ListPeers(req *apiv1.ListPeersReq, stream apiv1.DDRPv1_ListPeersServer) error
- func (s *Server) PreCommit(ctx context.Context, req *apiv1.PreCommitReq) (*apiv1.PreCommitRes, error)
- func (s *Server) ReadAt(_ context.Context, req *apiv1.ReadAtReq) (*apiv1.ReadAtRes, error)
- func (s *Server) SendUpdate(_ context.Context, req *apiv1.SendUpdateReq) (*apiv1.SendUpdateRes, error)
- func (s *Server) Start() error
- func (s *Server) Stop() error
- func (s *Server) Truncate(ctx context.Context, req *apiv1.TruncateReq) (*apiv1.Empty, error)
- func (s *Server) UnbanPeer(_ context.Context, req *apiv1.UnbanPeerReq) (*apiv1.Empty, error)
- func (s *Server) WriteAt(ctx context.Context, req *apiv1.WriteAtReq) (*apiv1.WriteAtRes, error)
- type Status
Constants ¶
View Source
const (
TransactionExpiry = 15000
)
Variables ¶
This section is empty.
Functions ¶
func AddPeerContext ¶
func BanPeerContext ¶
func GetBlobInfo ¶
func GetBlobInfoContext ¶
func ListBlobInfo ¶
func ListBlobInfoContext ¶
func UnbanPeerContext ¶
Types ¶
type BlobReader ¶
type BlobReader struct {
// contains filtered or unexported fields
}
func NewBlobReader ¶
func NewBlobReader(client apiv1.DDRPv1Client, name string) *BlobReader
type BlobWriter ¶
type BlobWriter struct {
// contains filtered or unexported fields
}
func NewBlobWriter ¶
func NewBlobWriter(client apiv1.DDRPv1Client, signer crypto.Signer, name string) *BlobWriter
func (*BlobWriter) Commit ¶
func (b *BlobWriter) Commit(broadcast bool) error
func (*BlobWriter) Open ¶
func (b *BlobWriter) Open() error
func (*BlobWriter) Truncate ¶
func (b *BlobWriter) Truncate() error
type Peer ¶
type Peer struct { ID string IP string Banned bool Whitelisted bool Connected bool TxBytes uint64 RxBytes uint64 }
func ListPeersContext ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Checkout ¶
func (s *Server) Checkout(ctx context.Context, req *apiv1.CheckoutReq) (*apiv1.CheckoutRes, error)
func (*Server) GetBlobInfo ¶
func (s *Server) GetBlobInfo(_ context.Context, req *apiv1.BlobInfoReq) (*apiv1.BlobInfoRes, error)
func (*Server) ListBlobInfo ¶
func (s *Server) ListBlobInfo(req *apiv1.ListBlobInfoReq, srv apiv1.DDRPv1_ListBlobInfoServer) error
func (*Server) ListPeers ¶
func (s *Server) ListPeers(req *apiv1.ListPeersReq, stream apiv1.DDRPv1_ListPeersServer) error
func (*Server) PreCommit ¶
func (s *Server) PreCommit(ctx context.Context, req *apiv1.PreCommitReq) (*apiv1.PreCommitRes, error)
func (*Server) SendUpdate ¶
func (s *Server) SendUpdate(_ context.Context, req *apiv1.SendUpdateReq) (*apiv1.SendUpdateRes, error)
func (*Server) WriteAt ¶
func (s *Server) WriteAt(ctx context.Context, req *apiv1.WriteAtReq) (*apiv1.WriteAtRes, error)
Click to show internal directories.
Click to hide internal directories.