manager

package
v0.0.0-...-4fe8a44 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	DB *pgdb.DB
	// contains filtered or unexported fields
}

Server implementation for manager

func New

func New(db *pgdb.DB, connectionFactory *secureconn.Factory, secretsEndpoint string) *Server

New creates a new server

func (*Server) ChangeNodeState

func (srv *Server) ChangeNodeState(ctx context.Context, in *manager.NodeState) (*manager.ChangeNodeStateResponse, error)

ChangeNodeState takes a node id and desired state and modified the node to reflect selected state. If selected state is not running, status will be updated to unreachable.

func (*Server) Connect

func (srv *Server) Connect(ctx context.Context, in *manager.NodeManager) (*pb.Empty, error)

Connect takes a NodeManager object and tests it's connectivity

func (*Server) ConnectManager

func (srv *Server) ConnectManager(ctx context.Context, in *manager.Id) (*pb.Empty, error)

ConnectManager attempts a connection to a node manager given a manager id

func (*Server) Create

func (srv *Server) Create(ctx context.Context, in *manager.NodeManager) (*manager.Ids, error)

Create a new node manager

func (*Server) Delete

func (srv *Server) Delete(ctx context.Context, in *manager.Id) (*pb.Empty, error)

Delete a node manager

func (*Server) DeleteWithNodeStateStopped

func (srv *Server) DeleteWithNodeStateStopped(ctx context.Context, in *manager.Id) (*pb.Empty, error)

Delete a node manager and set its nodes' states to stopped

func (*Server) DeleteWithNodeStateTerminated

func (srv *Server) DeleteWithNodeStateTerminated(ctx context.Context, in *manager.Id) (*pb.Empty, error)

Delete a node manager and set its nodes' states to terminated

func (*Server) DeleteWithNodes

func (srv *Server) DeleteWithNodes(ctx context.Context, in *manager.Id) (*manager.Ids, error)

Delete a node manager with its nodes

func (*Server) GetNodeWithSecrets

func (srv *Server) GetNodeWithSecrets(ctx context.Context, id *manager.Id) (*nodes.Node, error)

func (*Server) List

func (srv *Server) List(ctx context.Context, in *manager.Query) (*manager.NodeManagers, error)

List node managers

func (*Server) ProcessNode

func (srv *Server) ProcessNode(ctx context.Context, in *manager.NodeMetadata) (*manager.ProcessNodeResponse, error)

ProcessNode takes node metadata information and updates or adds the node reference accordingly

func (*Server) Read

func (srv *Server) Read(ctx context.Context, in *manager.Id) (*manager.NodeManager, error)

Read a node manager via ID

func (*Server) SearchManagerNodes

func (srv *Server) SearchManagerNodes(ctx context.Context, in *manager.NodeQuery) (*manager.ManagerNodes, error)

SearchManagerNodes returns a list of type ManagerNode give a nodeQuery that includes a manager id and whatever filters needed. This is used by the inspec-agent when resolving jobs to a desired set of nodes.

func (*Server) SearchNodeFields

func (srv *Server) SearchNodeFields(ctx context.Context, in *manager.FieldQuery) (*manager.Fields, error)

SearchFields for the manager, return fields

func (*Server) SearchNodes

func (srv *Server) SearchNodes(ctx context.Context, in *manager.NodeQuery) (*manager.Nodes, error)

SearchNodes for the manager, returns nodes

func (*Server) Update

func (srv *Server) Update(ctx context.Context, in *manager.NodeManager) (*pb.Empty, error)

Update one node manager

Jump to

Keyboard shortcuts

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