Documentation
¶
Index ¶
- type GRPCHandler
- func (h *GRPCHandler) GetRoots(ctx context.Context, req *pb.GetRootsRequest) (*pb.GetRootsResponse, error)
- func (h *GRPCHandler) Heartbeat(ctx context.Context, req *pb.HeartbeatRequest) (*pb.HeartbeatResponse, error)
- func (h *GRPCHandler) Navigate(ctx context.Context, req *pb.NavigateRequest) (*pb.NavigateResponse, error)
- func (h *GRPCHandler) RegisterFileServer(ctx context.Context, req *pb.RegisterFileServerRequest) (*pb.RegisterFileServerResponse, error)
- func (h *GRPCHandler) RootShare(ctx context.Context, req *pb.RootShareRequest) (*pb.RootShareResponse, error)
- func (h *GRPCHandler) RootUnshare(ctx context.Context, req *pb.RootUnshareRequest) (*pb.RootUnshareResponse, error)
- type MetaServer
- type SharedDirEntry
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 ¶
func (h *GRPCHandler) GetRoots(ctx context.Context, req *pb.GetRootsRequest) (*pb.GetRootsResponse, error)
Navigate client to the appropriate file server based on user
func (*GRPCHandler) Heartbeat ¶
func (h *GRPCHandler) Heartbeat(ctx context.Context, req *pb.HeartbeatRequest) (*pb.HeartbeatResponse, error)
Heartbeat updates liveness for an already-registered fileserver.
func (*GRPCHandler) Navigate ¶
func (h *GRPCHandler) Navigate(ctx context.Context, req *pb.NavigateRequest) (*pb.NavigateResponse, error)
Navigate client to the appropriate file server based on user
func (*GRPCHandler) RegisterFileServer ¶
func (h *GRPCHandler) RegisterFileServer(ctx context.Context, req *pb.RegisterFileServerRequest) (*pb.RegisterFileServerResponse, error)
RegisterFileServer handles file server registration
func (*GRPCHandler) RootShare ¶
func (h *GRPCHandler) RootShare(ctx context.Context, req *pb.RootShareRequest) (*pb.RootShareResponse, error)
Share a root
func (*GRPCHandler) RootUnshare ¶
func (h *GRPCHandler) RootUnshare(ctx context.Context, req *pb.RootUnshareRequest) (*pb.RootUnshareResponse, error)
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 {
}