grpc

package
v0.0.0-...-fa535dc Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

gRPC server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerServerClass

type PeerServerClass struct {
	GotFile *bchan.Bchan
	// contains filtered or unexported fields
}

func NewPeerServerClass

func NewPeerServerClass(lgs api.LocalGetSet, cfg *ServerConfig) *PeerServerClass

func (*PeerServerClass) IncrementGotFileCount

func (s *PeerServerClass) IncrementGotFileCount()

func (*PeerServerClass) SendFile

func (s *PeerServerClass) SendFile(stream pb.Peer_SendFileServer) error

Implement pb.PeerServer interface; the server is receiving a file here, because the client called SendFile() on the other end.

type ServerConfig

type ServerConfig struct {
	MyID string
	Host string // ip address

	// by default, we use SSH
	UseTLS bool

	// For when your VPN already provides encryption.
	SkipEncryption bool // turn off both SSH and TLS.

	CertPath string
	KeyPath  string

	ExternalLsnPort int
	InternalLsnPort int
	CpuProfilePath  string

	SshegoCfg *tun.SshegoConfig

	ServerGotGetReply   chan *api.BcastGetReply
	ServerGotSetRequest chan *api.BcastSetRequest

	Halt *idem.Halter

	GrpcServer *grpc.Server
	Cls        *PeerServerClass
}

func (*ServerConfig) DefineFlags

func (c *ServerConfig) DefineFlags(fs *flag.FlagSet)

func (*ServerConfig) ValidateConfig

func (c *ServerConfig) ValidateConfig() error

Jump to

Keyboard shortcuts

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