Documentation ¶
Index ¶
- Constants
- Variables
- type RegProcessor
- func (p *RegProcessor) AddTransport(index pb.TransportType, t lib.Transport) error
- func (p *RegProcessor) Close() error
- func (p *RegProcessor) RegisterBidirectional(c2sPayload *pb.C2SWrapper, regMethod pb.RegistrationSource, clientAddr []byte) (*pb.RegistrationResponse, error)
- func (p *RegProcessor) RegisterUnidirectional(c2sPayload *pb.C2SWrapper, regMethod pb.RegistrationSource, clientAddr []byte) error
- func (p *RegProcessor) ReloadOverrides() error
- func (p *RegProcessor) ReloadSubnets() error
Constants ¶
const ( // RegIDLen The length of the shared secret sent by the client in bytes. RegIDLen = 16 // SecretLength gives the length of a secret (used for minimum registration body len) SecretLength = 32 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type RegProcessor ¶
type RegProcessor struct {
// contains filtered or unexported fields
}
RegProcessor provides an interface to publish registrations and helper functions to process registration requests
func NewRegProcessor ¶
func NewRegProcessor(zmqBindAddr string, zmqPort uint16, privkey []byte, authVerbose bool, stationPublicKeys []string, metrics *metrics.Metrics) (*RegProcessor, error)
NewRegProcessor initialize a new RegProcessor
func NewRegProcessorNoAuth ¶
func NewRegProcessorNoAuth(zmqBindAddr string, zmqPort uint16, metrics *metrics.Metrics) (*RegProcessor, error)
NewRegProcessorNoAuth creates a regprocessor without authentication to zmq address
func (*RegProcessor) AddTransport ¶
func (p *RegProcessor) AddTransport(index pb.TransportType, t lib.Transport) error
AddTransport initializes a transport so that it can be tracked by the manager when clients register.
func (*RegProcessor) Close ¶
func (p *RegProcessor) Close() error
Close cleans up the (ZMQ) servers running in the background supporting registration.
func (*RegProcessor) RegisterBidirectional ¶
func (p *RegProcessor) RegisterBidirectional(c2sPayload *pb.C2SWrapper, regMethod pb.RegistrationSource, clientAddr []byte) (*pb.RegistrationResponse, error)
RegisterBidirectional process a bidirectional registration request, publish it to zmq, and returns a response
func (*RegProcessor) RegisterUnidirectional ¶
func (p *RegProcessor) RegisterUnidirectional(c2sPayload *pb.C2SWrapper, regMethod pb.RegistrationSource, clientAddr []byte) error
RegisterUnidirectional process a unidirectional registration request and publish it to zmq
func (*RegProcessor) ReloadOverrides ¶
func (p *RegProcessor) ReloadOverrides() error
ReloadOverrides allows the registrar to reload the configuration for the registration processing overrides when the registrar receives a SIGHUP signal for example. TODO: implement
func (*RegProcessor) ReloadSubnets ¶
func (p *RegProcessor) ReloadSubnets() error
ReloadSubnets allows the registrar to reload the configuration for phantom address selection subnets when the registrar receives a SIGHUP signal for example. If it fails it reports and error and keeps the existing set of phantom subnets.