server

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package server is the Bootz server reference implementation.

The bootz server will provide a simple file based bootstrap implementation for devices. The service can be extended by providing your own implementation of the entity manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartDhcpServer

func StartDhcpServer(em *entitymanager.InMemoryEntityManager, dhcpIntf string) error

StartDhcpServer start dhcp server based on the dhcpIntf interface and dhcp configuration added for devices

func StartImageServer

func StartImageServer(opt *ImgSrvOpts) *http.Server

StartImageServer starts an https server as an image server.

Types

type DHCPOpts

type DHCPOpts struct {
	// contains filtered or unexported fields
}

DHCPOpts is an struct that captures dhcp server config.

type ImgSrvOpts

type ImgSrvOpts struct {
	ImagesLocation string
	Address        string
	CertFile       string
	KeyFile        string
}

ImgSrvOpts is an struct that captures dhcp server config.

type InterceptorOpts

type InterceptorOpts struct {
	BootzInterceptor grpc.UnaryServerInterceptor
}

InterceptorOpts is an struct that is used to pass an interceptor function. This option is added to enable proper testing of bootz.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the bootz emulator server.

func NewServer

func NewServer(bootzAddr string, em *entitymanager.InMemoryEntityManager, sa *service.SecurityArtifacts, opts ...bootzServerOpts) (*Server, error)

NewServer start a new Bootz gRPC , dhcp, and image server based on specified flags.

func (*Server) Start

func (s *Server) Start() error

Start starts up the bootz emulator server.

func (*Server) Stop

func (s *Server) Stop()

Stop shuts down the bootz emulator server.

Directories

Path Synopsis
Bootz server reference implementation.
Bootz server reference implementation.
Package entitymanager is an in-memory implementation of an entity manager that models an organization's inventory.
Package entitymanager is an in-memory implementation of an entity manager that models an organization's inventory.
Package service receives bootstrap requests and responds with the relevant data.
Package service receives bootstrap requests and responds with the relevant data.

Jump to

Keyboard shortcuts

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