event

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const CMD_AddPin = "AddPin"
View Source
const CMD_AggregateContent = "AggregateContent"
View Source
const CMD_CleanupPreparedRequest = "CleanupPreparedRequest"
View Source
const CMD_ComputeCommP = "ComputeCommP"
View Source
const CMD_PrepareForDataRequest = "PrepareForDataRequest"
View Source
const CMD_ReqTxStatus = "ReqTxStatus"
View Source
const CMD_RestartTransfer = "RestartTransfer"
View Source
const CMD_RetrieveContent = "RetrieveContent"
View Source
const CMD_SplitContent = "SplitContent"
View Source
const CMD_StartTransfer = "StartTransfer"
View Source
const CMD_TakeContent = "TakeContent"
View Source
const CMD_UnpinContent = "UnpinContent"
View Source
const OP_CommPComplete = "CommPComplete"
View Source
const OP_CommPFailed = "OP_CommPFailed"
View Source
const OP_GarbageCheck = "GarbageCheck"
View Source
const OP_PinComplete = "PinComplete"
View Source
const OP_SanityCheck = "SanityCheck"
View Source
const OP_ShuttleUpdate = "ShuttleUpdate"
View Source
const OP_SplitComplete = "SplitComplete"
View Source
const OP_SplitFailed = "OP_SplitFailed"
View Source
const OP_TransferFinished = "TransferFinished"
View Source
const OP_TransferStarted = "TransferStarted"
View Source
const OP_TransferStatus = "TransferStatus"
View Source
const OP_UpdatePinStatus = "UpdateContentPinStatus"

Variables

View Source
var CommandTopics = map[string]bool{
	CMD_ComputeCommP:           true,
	CMD_AddPin:                 true,
	CMD_TakeContent:            true,
	CMD_AggregateContent:       true,
	CMD_StartTransfer:          true,
	CMD_PrepareForDataRequest:  true,
	CMD_CleanupPreparedRequest: true,
	CMD_ReqTxStatus:            true,
	CMD_SplitContent:           true,
	CMD_RetrieveContent:        true,
	CMD_UnpinContent:           true,
	CMD_RestartTransfer:        true,
}

add new estuary command topic here, so shuttle consumers can be registered for them

View Source
var MessageTopics = map[string]bool{
	OP_UpdatePinStatus:  true,
	OP_PinComplete:      true,
	OP_CommPComplete:    true,
	OP_CommPFailed:      true,
	OP_TransferStarted:  true,
	OP_TransferFinished: true,
	OP_TransferStatus:   true,
	OP_ShuttleUpdate:    true,
	OP_GarbageCheck:     true,
	OP_SplitComplete:    true,
	OP_SplitFailed:      true,
	OP_SanityCheck:      true,
}

add new shuttle operation topic here, so estaury consumers can be registered for them

Functions

This section is empty.

Types

type AddPin

type AddPin struct {
	DBID   uint64
	UserId uint
	Cid    cid.Cid
	Peers  []*peer.AddrInfo
}

type AggregateContent

type AggregateContent struct {
	ID   uint64
	CID  cid.Cid
	Name string
}

type AggregateContents

type AggregateContents struct {
	DBID     uint64
	UserID   uint
	Contents []AggregateContent
}

type CleanupPreparedRequest

type CleanupPreparedRequest struct {
	DealDBID  uint
	AuthToken string
}

type CmdParams

type CmdParams struct {
	AddPin                 *AddPin                 `json:",omitempty"`
	ComputeCommP           *ComputeCommP           `json:",omitempty"`
	TakeContent            *TakeContent            `json:",omitempty"`
	AggregateContent       *AggregateContents      `json:",omitempty"`
	StartTransfer          *StartTransfer          `json:",omitempty"`
	PrepareForDataRequest  *PrepareForDataRequest  `json:",omitempty"`
	CleanupPreparedRequest *CleanupPreparedRequest `json:",omitempty"`
	ReqTxStatus            *ReqTxStatus            `json:",omitempty"`
	SplitContent           *SplitContent           `json:",omitempty"`
	RetrieveContent        *RetrieveContent        `json:",omitempty"`
	UnpinContent           *UnpinContent           `json:",omitempty"`
	RestartTransfer        *RestartTransfer        `json:",omitempty"`
}

type CommPComplete

type CommPComplete struct {
	Data    cid.Cid
	CommP   cid.Cid
	CarSize uint64
	Size    abi.UnpaddedPieceSize
}

type CommPFailed added in v0.4.0

type CommPFailed struct {
	Data cid.Cid
}

type Command

type Command struct {
	Op           string
	Params       CmdParams
	TraceCarrier *TraceCarrier `json:",omitempty"`
	Handle       string
}

func (*Command) HasTraceCarrier

func (c *Command) HasTraceCarrier() bool

HasTraceCarrier returns true iff Command `c` contains a trace.

type ComputeCommP

type ComputeCommP struct {
	Data cid.Cid
}

type ContentFetch

type ContentFetch struct {
	ID     uint64
	Cid    cid.Cid
	UserID uint
	Peers  []*peer.AddrInfo
}

type GarbageCheck

type GarbageCheck struct {
	Contents []uint64
}

type Hello

type Hello struct {
	Host                  string
	PeerID                string
	DiskSpaceFree         int64
	Address               address.Address
	AddrInfo              peer.AddrInfo
	Private               bool
	ContentAddingDisabled bool
	QueueEngEnabled       bool
}

type Hi

type Hi struct {
	QueueEngEnabled bool
}

type Message

type Message struct {
	Op           string
	Params       MsgParams
	TraceCarrier *TraceCarrier `json:",omitempty"`
	Handle       string
}

func (*Message) HasTraceCarrier

func (m *Message) HasTraceCarrier() bool

HasTraceCarrier returns true iff Message `m` contains a trace.

type MsgParams

type MsgParams struct {
	UpdatePinStatus  *UpdatePinStatus           `json:",omitempty"`
	PinComplete      *PinComplete               `json:",omitempty"`
	CommPComplete    *CommPComplete             `json:",omitempty"`
	CommPFailed      *CommPFailed               `json:",omitempty"`
	TransferStatus   *TransferStatus            `json:",omitempty"`
	TransferStarted  *TransferStartedOrFinished `json:",omitempty"`
	TransferFinished *TransferStartedOrFinished `json:",omitempty"`
	ShuttleUpdate    *ShuttleUpdate             `json:",omitempty"`
	GarbageCheck     *GarbageCheck              `json:",omitempty"`
	SplitComplete    *SplitComplete             `json:",omitempty"`
	SplitFailed      *SplitFailed               `json:",omitempty"`
	SanityCheck      *SanityCheck               `json:",omitempty"`
}

type PinComplete

type PinComplete struct {
	DBID    uint64
	Size    int64
	CID     cid.Cid
	Objects []PinObj
}

type PinObj

type PinObj struct {
	Cid  cid.Cid
	Size uint64
}

type PrepareForDataRequest

type PrepareForDataRequest struct {
	DealDBID    uint
	AuthToken   string
	ProposalCid cid.Cid
	PayloadCid  cid.Cid
	Size        uint64
}

type ReqTxStatus

type ReqTxStatus struct {
	DealDBID uint
	ChanID   string
}

type RestartTransfer

type RestartTransfer struct {
	ChanID    datatransfer.ChannelID
	DealDBID  uint
	ContentID uint64
}

type RetrieveContent

type RetrieveContent struct {
	UserID  uint
	Content uint64
	Cid     cid.Cid
	Deals   []StorageDeal
}

type SanityCheck

type SanityCheck struct {
	CID    cid.Cid
	ErrMsg string
}

type ShuttleUpdate

type ShuttleUpdate struct {
	BlockstoreSize uint64
	BlockstoreFree uint64
	NumPins        int64
	PinQueueSize   int
}

type SplitComplete

type SplitComplete struct {
	ID uint64
}

type SplitContent

type SplitContent struct {
	Content uint64
	Size    int64
}

type SplitFailed added in v0.4.0

type SplitFailed struct {
	ID uint64
}

type StartTransfer

type StartTransfer struct {
	DealDBID  uint
	ContentID uint64
	Miner     address.Address
	PropCid   cid.Cid
	DataCid   cid.Cid
}

type StorageDeal

type StorageDeal struct {
	Miner  address.Address
	DealID int64
}

type TakeContent

type TakeContent struct {
	Contents []ContentFetch
}

type TraceCarrier

type TraceCarrier struct {
	TraceID trace.TraceID `json:"traceID"`
	SpanID  trace.SpanID  `json:"spanID"`
	Remote  bool          `json:"remote"`
}

TraceCarrier is a wrapper that allows trace.SpanContext's to be round-tripped through JSON.

func NewTraceCarrier

func NewTraceCarrier(sc trace.SpanContext) *TraceCarrier

NewTraceCarrier accepts a trace.SpanContext and returns a TraceCarrier.

func (*TraceCarrier) AsSpanContext

func (c *TraceCarrier) AsSpanContext() trace.SpanContext

AsSpanContext converts TraceCarrier to a trace.SpanContext.

func (*TraceCarrier) MarshalJSON

func (c *TraceCarrier) MarshalJSON() ([]byte, error)

MarshalJSON converts TraceCarrier to a trace.SpanContext and marshals it to JSON.

func (*TraceCarrier) UnmarshalJSON

func (c *TraceCarrier) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshalls a serialized trace.SpanContext to a TraceCarrier.

type TransferStartedOrFinished

type TransferStartedOrFinished struct {
	DealDBID uint
	Chanid   string
	State    *filclient.ChannelState
}

type TransferStatus

type TransferStatus struct {
	Message  string
	Chanid   string
	DealDBID uint
	State    *filclient.ChannelState
	Failed   bool
}

type UnpinContent

type UnpinContent struct {
	Contents []uint64
}

type UpdatePinStatus

type UpdatePinStatus struct {
	DBID   uint64
	Status status.PinningStatus
}

Jump to

Keyboard shortcuts

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