Documentation

Overview

    Package read contains the structures describing request and response for read request. See xrootd protocol specification (http://xrootd.org/doc/dev45/XRdv310.pdf, p. 99) for details.

    Index

    Constants

    View Source
    const RequestID uint16 = 3013

      RequestID is the id of the request, it is sent as part of message. See xrootd protocol specification for details: http://xrootd.org/doc/dev45/XRdv310.pdf, 2.3 Client Request Format.

      Variables

      This section is empty.

      Functions

      This section is empty.

      Types

      type OptionalArgs

      type OptionalArgs struct {
      	// PathID is the path id returned by bind request.
      	// The response data is sent to this path, if possible.
      	PathID xrdproto.PathID
      
      	// ReadAhead is the slice of the pre-read requests.
      	ReadAheads []ReadAhead
      	// contains filtered or unexported fields
      }

        Request holds optional read request parameters.

        func (OptionalArgs) MarshalXrd

        func (o OptionalArgs) MarshalXrd(wBuffer *xrdenc.WBuffer) error

          MarshalXrd implements xrdproto.Marshaler.

          func (*OptionalArgs) UnmarshalXrd

          func (o *OptionalArgs) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

            UnmarshalXrd implements xrdproto.Unmarshaler.

            type ReadAhead

            type ReadAhead struct {
            	Handle xrdfs.FileHandle
            	Length int32
            	Offset int64
            }

              ReadAhead is the pre-read request. It is considered only a hint and can be used to schedule the pre-reading of data that will be asked in the very near future.

              func (ReadAhead) MarshalXrd

              func (o ReadAhead) MarshalXrd(wBuffer *xrdenc.WBuffer) error

                MarshalXrd implements xrdproto.Marshaler.

                func (*ReadAhead) UnmarshalXrd

                func (o *ReadAhead) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

                  UnmarshalXrd implements xrdproto.Unmarshaler.

                  type Request

                  type Request struct {
                  	Handle       xrdfs.FileHandle
                  	Offset       int64
                  	Length       int32
                  	OptionalArgs *OptionalArgs
                  }

                    Request holds read request parameters.

                    func (*Request) Direction

                    func (o *Request) Direction() xrdproto.DataRequestDirection

                      PathID implements xrdproto.DataRequest.Direction.

                      func (Request) MarshalXrd

                      func (o Request) MarshalXrd(wBuffer *xrdenc.WBuffer) error

                        MarshalXrd implements xrdproto.Marshaler.

                        func (*Request) PathData

                        func (o *Request) PathData() []byte

                          PathID implements xrdproto.DataRequest.PathData.

                          func (*Request) PathID

                          func (o *Request) PathID() xrdproto.PathID

                            PathID implements xrdproto.DataRequest.PathID.

                            func (*Request) ReqID

                            func (req *Request) ReqID() uint16

                              ReqID implements xrdproto.Request.ReqID.

                              func (*Request) SetPathID

                              func (o *Request) SetPathID(pathID xrdproto.PathID)

                                PathID implements xrdproto.DataRequest.SetPathID.

                                func (*Request) ShouldSign

                                func (req *Request) ShouldSign() bool

                                  ShouldSign implements xrdproto.Request.ShouldSign.

                                  func (*Request) UnmarshalXrd

                                  func (o *Request) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

                                    UnmarshalXrd implements xrdproto.Unmarshaler.

                                    type Response

                                    type Response struct {
                                    	Data []uint8
                                    }

                                      Response is a response for the read request, which contains the read data.

                                      func (Response) MarshalXrd

                                      func (o Response) MarshalXrd(wBuffer *xrdenc.WBuffer) error

                                        MarshalXrd implements xrdproto.Marshaler.

                                        func (*Response) RespID

                                        func (resp *Response) RespID() uint16

                                          RespID implements xrdproto.Response.RespID.

                                          func (*Response) UnmarshalXrd

                                          func (o *Response) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error

                                            UnmarshalXrd implements xrdproto.Unmarshaler.

                                            Source Files