server

package
v0.0.0-...-e675dcb Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataBackend

func NewDataBackend(impl string, params map[string]interface{}) (backend data.Backend, err error)

NewDataBackend Initialize data backend from type and data backend configuration

func NewMetadataBackend

func NewMetadataBackend(params map[string]interface{}, log *logger.Logger) (backend *metadata.Backend, err error)

NewMetadataBackend Initialize metadata backend from metadata 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) Clean

func (ps *PlikServer) Clean()

Clean delete expired data and metadata

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) Start

func (ps *PlikServer) Start() (err error)

Start a Plik Server instance

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() )

Jump to

Keyboard shortcuts

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