Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSocket ¶
type DataSocket interface { // the standard io.Reader interface Read(p []byte) (n int, err error) // the standard io.Writer interface Write(p []byte) (n int, err error) // the standard io.Closer interface Close() error // Set deadline associated with connection (scionftp) SetDeadline(t time.Time) error }
DataSocket describes a data socket is used to send non-control data between the scionftp and server.
type MultiSocket ¶
type MultiSocket struct { *ReaderSocket *WriterSocket // contains filtered or unexported fields }
func NewMultiSocket ¶
func NewMultiSocket(sockets []DataSocket, maxLength int) *MultiSocket
func (*MultiSocket) Close ¶
func (m *MultiSocket) Close() error
Only the scionftp should close the socket Sends the closing message
func (*MultiSocket) SetDeadline ¶
func (m *MultiSocket) SetDeadline(t time.Time) error
type ReadWorker ¶
type ReadWorker struct {
// contains filtered or unexported fields
}
A ReadWorker should be dispatched and runs until it receives the closing connection Does not need to be closed since it's closed automatically
func NewReadWorker ¶
func NewReadWorker(socket DataSocket) *ReadWorker
func (*ReadWorker) Run ¶
func (s *ReadWorker) Run(push chan<- *striping.Segment)
Keeps running until it receives an EOD flag
type ReaderSocket ¶
type ReaderSocket struct {
// contains filtered or unexported fields
}
func NewReadsocket ¶
func NewReadsocket(sockets []DataSocket) *ReaderSocket
func (*ReaderSocket) Close ¶
func (s *ReaderSocket) Close() error
type ScionSocket ¶
type ScionSocket struct {
*scion.Connection
}
func NewScionSocket ¶
func NewScionSocket(conn *scion.Connection) *ScionSocket
type WriteWorker ¶
type WriteWorker struct {
// contains filtered or unexported fields
}
func NewWriteWorker ¶
func NewWriteWorker(ctx context.Context, wg *sync.WaitGroup, segments chan *striping.Segment, socket DataSocket) *WriteWorker
func (*WriteWorker) Run ¶
func (w *WriteWorker) Run()
Writes segments until receives cancellation signal on Done() and sends EOD Header after that.
type WriterSocket ¶
type WriterSocket struct {
// contains filtered or unexported fields
}
func NewWriterSocket ¶
func NewWriterSocket(sockets []DataSocket, maxLength int) *WriterSocket
func (*WriterSocket) Close ¶
func (s *WriterSocket) Close() error
Closing the WriterSocket blocks until until all children have finished sending and then closes all sub-sockets
func (*WriterSocket) FinishAndWait ¶
func (s *WriterSocket) FinishAndWait()
Should only be called when all segments have been dispatchedReader, that is, segmentChannel should be empty