Documentation ¶
Overview ¶
gRPC server
Index ¶
Constants ¶
View Source
const ProgramName = "gprcServer"
Variables ¶
This section is empty.
Functions ¶
func MainExample ¶
func MainExample()
Types ¶
type PeerServerClass ¶
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) (err 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 ExternalHost string // ip address InternalHost string // defaults to 127.0.0.1 // 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 // contains filtered or unexported fields }
func NewServerConfig ¶
func NewServerConfig(myID string) *ServerConfig
func (*ServerConfig) DefineFlags ¶
func (c *ServerConfig) DefineFlags(fs *flag.FlagSet)
func (*ServerConfig) StartGrpcServer ¶
func (cfg *ServerConfig) StartGrpcServer( peer api.LocalGetSet, sshdReady chan bool, myID string, )
func (*ServerConfig) Stop ¶
func (cfg *ServerConfig) Stop()
func (*ServerConfig) ValidateConfig ¶
func (c *ServerConfig) ValidateConfig() error
Click to show internal directories.
Click to hide internal directories.