Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (61 sloc) 4.29 KB
// Copyright 2018 The go-hep Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package xrootd // import ""
import (
// Handler provides a high-level API for the XRootD server.
// The Handler receives a parsed request and returns a response together with the status
// that will be send via Server to the client.
type Handler interface {
// Handshake handles the XRootD handshake:
Handshake() (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Login handles the XRootD login request:
Login(sessionID [16]byte, request *login.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Protocol handles the XRootD protocol request:
Protocol(sessionID [16]byte, request *protocol.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Ping handles the XRootD ping request:
Ping(sessionID [16]byte, request *ping.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Dirlist handles the XRootD dirlist request:
Dirlist(sessionID [16]byte, request *dirlist.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// CloseSession handles the aborting of user session. This can be used to free some user-related data.
CloseSession(sessionID [16]byte) error
// Open handles the XRootD open request:
Open(sessionID [16]byte, request *open.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Close handles the XRootD close request:
Close(sessionID [16]byte, request *xrdclose.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Read handles the XRootD read request:
Read(sessionID [16]byte, request *read.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Write handles the XRootD write request:
Write(sessionID [16]byte, request *write.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Stat handles the XRootD stat request:
Stat(sessionID [16]byte, request *stat.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Sync handles the XRootD sync request:
Sync(sessionID [16]byte, request *sync.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Truncate handles the XRootD truncate request:
Truncate(sessionID [16]byte, request *truncate.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Rename handles the XRootD mv request:
Rename(sessionID [16]byte, request *mv.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Mkdir handles the XRootD mkdir request:
Mkdir(sessionID [16]byte, request *mkdir.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// Remove handles the XRootD rm request:
Remove(sessionID [16]byte, request *rm.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)
// RemoveDir handles the XRootD rmdir request:
RemoveDir(sessionID [16]byte, request *rmdir.Request) (xrdproto.Marshaler, xrdproto.ResponseStatus)