metaserver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: GPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCHandler

type GRPCHandler struct {
	pb.UnimplementedMetaServerServer
	MetaServer *MetaServer
}

GRPCHandler implements the gRPC meta server interface

func NewGRPCHandler

func NewGRPCHandler(metaServer *MetaServer) *GRPCHandler

NewGRPCHandler creates a new gRPC handler

func (*GRPCHandler) GetRoots

Navigate client to the appropriate file server based on user

func (*GRPCHandler) Heartbeat

Heartbeat updates liveness for an already-registered fileserver.

func (*GRPCHandler) Navigate

Navigate client to the appropriate file server based on user

func (*GRPCHandler) RegisterFileServer

RegisterFileServer handles file server registration

func (*GRPCHandler) RootShare

Share a root

func (*GRPCHandler) RootUnshare

Unshare a root

type MetaServer

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

func NewMetaServer

func NewMetaServer(stateFile string) (*MetaServer, error)

NewFileServer creates a new file server object, either blank or loading from existing data

func (*MetaServer) SaveState

func (ms *MetaServer) SaveState() error

func (*MetaServer) SetHeartbeatConfig

func (ms *MetaServer) SetHeartbeatConfig(timeout, checkInterval time.Duration)

func (*MetaServer) StartHeartbeatMonitor

func (ms *MetaServer) StartHeartbeatMonitor() func()

type SharedDirEntry

type SharedDirEntry struct {
	Owner       string // Directory owner username
	Path        string // Full path including username
	DisplayName string // Directory name to display
}

Jump to

Keyboard shortcuts

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