Documentation
¶
Index ¶
Constants ¶
const ( // DefaultPort is the port number the daemon will listen on in the absence of port number specified by user. DefaultPort = 16 // TestPort is used exclusively by test cases to configure daemon under testing. TestPort = 18378 )
Variables ¶
This section is empty.
Functions ¶
func TestPasswdRPCDaemon ¶
func TestPasswdRPCDaemon(daemon *Daemon, t testingstub.T)
TestPasswdRPCDaemon is used exclusively by test case to run a comprehensive test routine for the daemon control functions. The daemon must have already been completed with all of its configuration and successfully initialised. See passwdrpc_test.go for the daemon initialisation routine.
Types ¶
type Daemon ¶
type Daemon struct { // Address is the IP address to listen on, e.g. 0.0.0.0 to listen on all network interfaces. Address string `json:"Address"` // Port to listen on. Port int `json:"Port"` // TLSCertPath is the path in file system pointing to the TLS certificate, this is optional. TLSCertPath string `json:"TLSCertPath"` // TLSCertPath is the path in file system pointing to the TLS certificate key, this is optional. TLSKeyPath string `json:"TLSKeyPath"` // PasswordRegister is the gRPC service implementation that handles RPC calls on-the-wire. PasswordRegister *netboundfileenc.PasswordRegister `json:"-"` // contains filtered or unexported fields }
Daemon offers a network listener for a gRPC service that allows other laitos program instances to obtain password for unlocking their encrypted config/data files.
func (*Daemon) Initialise ¶
Initialise validates configuration parameters and initialises the internal states of the daemon.
func (*Daemon) StartAndBlock ¶
StartAndBlock starts a network listener and serves incoming requests using the embedded gRPC server. The function will block caller until Stop is called.