Documentation
¶
Index ¶
- type CommanderServer
- func (c *CommanderServer) GetNodes(ctx context.Context, in *pb.NodeQuery) (*pb.NodeQueryResponse, error)
- func (c *CommanderServer) SendCommandToNodes(ctx context.Context, cmd *pb.CommanderRequest) (*pb.AggregateResponses, error)
- func (c *CommanderServer) SendCommandToNodesStream(cmd *commands.CommanderRequest, ...) error
- type Coordinator
- func (co *Coordinator) NewCoordinator(ctx context.Context, opts ...Option) error
- func (co *Coordinator) StartDatabase(ctx context.Context) error
- func (co *Coordinator) StartPingService(ctx context.Context)
- func (co *Coordinator) StartRPCCoordinationServer(ctx context.Context) error
- func (co *Coordinator) WithDevMode(mode bool) Option
- type Option
- type RegistrationServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommanderServer ¶
type CommanderServer struct { sync.WaitGroup pb.UnimplementedCommandManagerServer DB *sql.DB CO *Coordinator ID string }
func (*CommanderServer) GetNodes ¶
func (c *CommanderServer) GetNodes(ctx context.Context, in *pb.NodeQuery) (*pb.NodeQueryResponse, error)
func (*CommanderServer) SendCommandToNodes ¶
func (c *CommanderServer) SendCommandToNodes(ctx context.Context, cmd *pb.CommanderRequest) (*pb.AggregateResponses, error)
func (*CommanderServer) SendCommandToNodesStream ¶
func (c *CommanderServer) SendCommandToNodesStream(cmd *commands.CommanderRequest, stream pb.CommandManager_SendCommandToNodesStreamServer) error
type Coordinator ¶
type Coordinator struct { connections.Tailnet services.DataManagement ID string // contains filtered or unexported fields }
Coordinator holds the runtime variables for the coordination server
func (*Coordinator) NewCoordinator ¶
func (co *Coordinator) NewCoordinator(ctx context.Context, opts ...Option) error
NewCoordinator Create a new coordinator instance and set the provided options
func (*Coordinator) StartDatabase ¶
func (co *Coordinator) StartDatabase(ctx context.Context) error
func (*Coordinator) StartPingService ¶
func (co *Coordinator) StartPingService(ctx context.Context)
func (*Coordinator) StartRPCCoordinationServer ¶
func (co *Coordinator) StartRPCCoordinationServer(ctx context.Context) error
StartRPCCoordinationServer Register the gRPC server endpoints and start the server
func (*Coordinator) WithDevMode ¶
func (co *Coordinator) WithDevMode(mode bool) Option
WithDevMode enable the server to run in dev mode
type Option ¶
type Option func(co *Coordinator) error
Options defines the configuration options function for configuration injection
type RegistrationServer ¶
type RegistrationServer struct { pb.UnimplementedRegistrationServer DevMode bool ID string Hostname string DB *sql.DB }
RegistrationServer struct to contain proto for gRPC
func (*RegistrationServer) Register ¶
func (r *RegistrationServer) Register(ctx context.Context, in *pb.NodeRegistrationRequest) (*pb.NodeRegistrationResponse, error)
Register registers a node with the database when a node sends a request. Returns the server id so the node can verify further requests
Click to show internal directories.
Click to hide internal directories.