rest

package
v0.0.0-...-fc3682d Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(server *SyncServer) *mux.Router

NewRouter creates and configures a mux router

func Server

func Server(ctx context.Context, port string, filePath string, syncFileOps SyncFileOperations) error

func TestServer

func TestServer(ctx context.Context, port string, filePath string, timeout int)

TestServer daemon serves only one connection for each test then exits

Types

type DataSyncServer

type DataSyncServer interface {
	// contains filtered or unexported methods
}

type IdleTimer

type IdleTimer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewIdleTimer

func NewIdleTimer(idleTimeout time.Duration) *IdleTimer

func (*IdleTimer) ConnState

func (it *IdleTimer) ConnState(conn net.Conn, state http.ConnState)

func (*IdleTimer) Done

func (t *IdleTimer) Done() <-chan time.Time

type SyncFileOperations

type SyncFileOperations interface {
	UpdateSyncFileProgress(size int64)
}

type SyncFileStub

type SyncFileStub struct{}

func (*SyncFileStub) UpdateSyncFileProgress

func (f *SyncFileStub) UpdateSyncFileProgress(size int64)

type SyncServer

type SyncServer struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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