Documentation ¶
Index ¶
- func NewDataBackend(impl string, params map[string]interface{}) (backend data.Backend, err error)
- func NewMetadataBackend(params map[string]interface{}, log *logger.Logger) (backend *metadata.Backend, err error)
- type PlikServer
- func (ps *PlikServer) Clean()
- func (ps *PlikServer) GetConfig() *common.Configuration
- func (ps *PlikServer) GetDataBackend() data.Backend
- func (ps *PlikServer) GetMetadataBackend() *metadata.Backend
- func (ps *PlikServer) GetStreamBackend() data.Backend
- func (ps *PlikServer) PurgeDeletedFiles() (deleted int, err error)
- func (ps *PlikServer) Shutdown(timeout time.Duration) (err error)
- func (ps *PlikServer) ShutdownNow() (err error)
- func (ps *PlikServer) Start() (err error)
- func (ps *PlikServer) WithAuthenticator(authenticator *common.SessionAuthenticator) *PlikServer
- func (ps *PlikServer) WithDataBackend(backend data.Backend) *PlikServer
- func (ps *PlikServer) WithMetadataBackend(backend *metadata.Backend) *PlikServer
- func (ps *PlikServer) WithStreamBackend(backend data.Backend) *PlikServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataBackend ¶
NewDataBackend Initialize data backend from type and data backend configuration
Types ¶
type PlikServer ¶
type PlikServer struct {
// contains filtered or unexported fields
}
PlikServer is a Plik Server instance
func NewPlikServer ¶
func NewPlikServer(config *common.Configuration) (ps *PlikServer)
NewPlikServer create a new Plik Server instance
func (*PlikServer) GetConfig ¶
func (ps *PlikServer) GetConfig() *common.Configuration
GetConfig return the server configuration
func (*PlikServer) GetDataBackend ¶
func (ps *PlikServer) GetDataBackend() data.Backend
GetDataBackend return the configured DataBackend
func (*PlikServer) GetMetadataBackend ¶
func (ps *PlikServer) GetMetadataBackend() *metadata.Backend
GetMetadataBackend return the configured Backend
func (*PlikServer) GetStreamBackend ¶
func (ps *PlikServer) GetStreamBackend() data.Backend
GetStreamBackend return the configured StreamBackend
func (*PlikServer) PurgeDeletedFiles ¶
func (ps *PlikServer) PurgeDeletedFiles() (deleted int, err error)
PurgeDeletedFiles delete "removed" files from the data backend
func (*PlikServer) Shutdown ¶
func (ps *PlikServer) Shutdown(timeout time.Duration) (err error)
Shutdown gracefully shutdown a Plik Server instance with a timeout grace period for connexions to close
func (*PlikServer) ShutdownNow ¶
func (ps *PlikServer) ShutdownNow() (err error)
ShutdownNow a Plik Server instance abruptly closing all connection immediately
func (*PlikServer) WithAuthenticator ¶
func (ps *PlikServer) WithAuthenticator(authenticator *common.SessionAuthenticator) *PlikServer
WithAuthenticator configure the session authenticator to use ( call before Start() )
func (*PlikServer) WithDataBackend ¶
func (ps *PlikServer) WithDataBackend(backend data.Backend) *PlikServer
WithDataBackend configure the data backend to use ( call before Start() )
func (*PlikServer) WithMetadataBackend ¶
func (ps *PlikServer) WithMetadataBackend(backend *metadata.Backend) *PlikServer
WithMetadataBackend configure the metadata backend to use ( call before Start() )
func (*PlikServer) WithStreamBackend ¶
func (ps *PlikServer) WithStreamBackend(backend data.Backend) *PlikServer
WithStreamBackend configure the stream backend to use ( call before Start() )