Documentation ¶
Index ¶
- Variables
- func DownloadPiece(ctx context.Context, client pb.DRPCReplaySafePiecestoreClient, ...) (downloaded int64, chunks int, err error)
- func ForEachNodeCSV(file string, cb func(node storj.NodeURL) error) error
- func GetDialer(ctx context.Context, pooled bool, forceQuic bool) (rpc.Dialer, error)
- func GetDialerForIdentity(ctx context.Context, ident *identity.FullIdentity, pooled bool, forceQuic bool) (rpc.Dialer, error)
- func Measure(f func() error) (time.Duration, error)
- func NewTracedConnection(conn drpc.Conn) drpc.Conn
- func ParseSegmentPosition(i string) (uuid.UUID, metabase.SegmentPosition, error)
- func ParseUUID(id string) (uuid.UUID, error)
- func PrintHistogram(nodes []*nodeselection.SelectedNode, selector nodeselection.NodeAttribute)
- func RunLoop(n int, verbose bool, do func() error) (durationMs int64, err error)
- type Dialer
- type DialerHelper
- type DownloadRequest
- type KeySigner
- type Loop
- type OrderLimitCreator
- type Progres
- type TracedConnection
- func (t *TracedConnection) Close() error
- func (t *TracedConnection) Closed() <-chan struct{}
- func (t *TracedConnection) Invoke(ctx context.Context, rpc string, enc drpc.Encoding, in, out drpc.Message) (err error)
- func (t *TracedConnection) NewStream(ctx context.Context, rpc string, enc drpc.Encoding) (drpc.Stream, error)
- type TracedStream
- type WithKeySigner
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //go:embed identity.cert Certificate []byte //go:embed identity.key Key []byte )
Functions ¶
func DownloadPiece ¶
func DownloadPiece(ctx context.Context, client pb.DRPCReplaySafePiecestoreClient, creator *KeySigner, req DownloadRequest, handler func(data []byte, hash *pb.PieceHash, limit *pb.OrderLimit)) (downloaded int64, chunks int, err error)
func GetDialerForIdentity ¶
func ParseSegmentPosition ¶
ParseSegmentPosition parse segment position from segment/pos format
func PrintHistogram ¶
func PrintHistogram(nodes []*nodeselection.SelectedNode, selector nodeselection.NodeAttribute)
Types ¶
type DialerHelper ¶
func NewDialerHelper ¶
func NewDialerHelper(flagSet *flag.FlagSet) *DialerHelper
func (*DialerHelper) CreateDialer ¶
func (d *DialerHelper) CreateDialer() (Dialer, error)
func (*DialerHelper) CreateRPCDialer ¶
func (d *DialerHelper) CreateRPCDialer() (rpc.Dialer, error)
type DownloadRequest ¶
type KeySigner ¶
type KeySigner struct { Action pb.PieceAction TTL time.Duration // contains filtered or unexported fields }
func NewKeySigner ¶
func NewKeySignerFromDir ¶
func NewKeySignerFromFullIdentity ¶
func NewKeySignerFromFullIdentity(id *identity.FullIdentity, action pb.PieceAction) *KeySigner
func (*KeySigner) CreateOrderLimit ¶
func (d *KeySigner) CreateOrderLimit(ctx context.Context, pieceID storj.PieceID, size int64, sn storj.NodeID) (limit *pb.OrderLimit, pk storj.PiecePrivateKey, serial storj.SerialNumber, err error)
func (*KeySigner) GetSatelliteID ¶
type Loop ¶
type OrderLimitCreator ¶
type TracedConnection ¶
func (*TracedConnection) Close ¶
func (t *TracedConnection) Close() error
func (*TracedConnection) Closed ¶
func (t *TracedConnection) Closed() <-chan struct{}
type TracedStream ¶
type TracedStream struct {
// contains filtered or unexported fields
}
func (*TracedStream) Close ¶
func (t *TracedStream) Close() error
func (*TracedStream) CloseSend ¶
func (t *TracedStream) CloseSend() error
func (*TracedStream) Context ¶
func (t *TracedStream) Context() context.Context
type WithKeySigner ¶
type WithKeySigner struct { SignerIdentity string `usage:"the identity directory for signing order limits"` TTL time.Duration `usage:"piece expiration period of orders"` // contains filtered or unexported fields }
func (*WithKeySigner) CreateOrderLimit ¶
func (w *WithKeySigner) CreateOrderLimit(ctx context.Context, pieceID storj.PieceID, size int64, sn storj.NodeID) (limit *pb.OrderLimit, pk storj.PiecePrivateKey, serial storj.SerialNumber, err error)
func (*WithKeySigner) Init ¶
func (w *WithKeySigner) Init(action pb.PieceAction) (err error)
Click to show internal directories.
Click to hide internal directories.