inspector

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package inspector implements a client-server utility that can be used for verifying Kismatic nodes. The server can be run without the client, but networking checks require the client to connect to a check server running on a remote node.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// TargetNode is the ip:port of the inspector running on the remote node
	TargetNode string
	// TargetNodeRole is the role of the node we are inspecting
	TargetNodeFacts []string
	// contains filtered or unexported fields
}

The Client executes rules against a remote inspector

func NewClient

func NewClient(targetNode string, targetNodeFacts []string) (*Client, error)

NewClient returns an inspector client for running checks against remote nodes.

func (Client) ExecuteRules

func (c Client) ExecuteRules(rules []rule.Rule) ([]rule.Result, error)

ExecuteRules against the target inspector server

type Server

type Server struct {
	// The Port the server will listen on
	Port int
	// NodeFacts are the facts that apply to the node where the server is running
	NodeFacts []string
	// contains filtered or unexported fields
}

Server supports the execution of inspector rules from a remote node

func NewServer

func NewServer(nodeFacts []string, port int, packageInstallationDisabled bool, dockerInstallationDisabled bool, disconnectedInstallation bool) (*Server, error)

NewServer returns an inspector server that has been initialized with the default rules engine

func (*Server) Start

func (s *Server) Start() error

Start the server

Directories

Path Synopsis
Package check implements a set of primitive checks that are used to validate inspector rules
Package check implements a set of primitive checks that are used to validate inspector rules
Package cmd implements the CLI commands of the inspector
Package cmd implements the CLI commands of the inspector
Package rule implements the inspector rules and the engine that runs the rules according to the conditions.
Package rule implements the inspector rules and the engine that runs the rules according to the conditions.

Jump to

Keyboard shortcuts

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