machine

package
v0.0.0-...-5f133c6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallLibPam

func InstallLibPam(l logger.Logger) error

func InstallNssAutoUser

func InstallNssAutoUser(l logger.Logger) error

InstallNssAutoUser will attempt to install nssAutoUser if it can. Requires root. If not run as root or if not on support operating system, it will error out.

func InstallNssAutoUserConf

func InstallNssAutoUserConf(path string, conf *NssConf) error

InstallNssAutoUserConf will read from the nssautouser.conf.gotmpl file, and output in /etc/nss-autouser.conf

func InstallPamSSHDFile

func InstallPamSSHDFile(path string, l logger.Logger) error

Pam Installer Functions

func InstallPamScript

func InstallPamScript(path string, l logger.Logger) error

func NewEnrollCommand

func NewEnrollCommand(conf *config.Node) *cobra.Command

func NewNodeCommand

func NewNodeCommand(common *config.Common) *cobra.Command

func NewPollCommand

func NewPollCommand(conf *config.Node) *cobra.Command

func NewSystemdCommand

func NewSystemdCommand() *cobra.Command

func ParseSystemdTemplate

func ParseSystemdTemplate(user, installPath, command string) (string, error)

func ReadNssConf

func ReadNssConf(conf *NssConf) ([]byte, error)

func ReadSSHDContent

func ReadSSHDContent(cafile, hostKey, hostCertificateFile string) ([]byte, error)

Types

type Machine

type Machine struct {
	MachinistClient mpb.ControllerClient
	AuthClient      apb.AuthClient
	Repeater        *retry.Options
	Log             logger.Logger

	// Dial func will override any existing options to connect
	DialFunc func() (*grpc.ClientConn, error)

	*config.Node
}

func New

func New(mods ...NodeModifier) (*Machine, error)

func (*Machine) BeginPolling

func (n *Machine) BeginPolling() error

func (*Machine) Enroll

func (n *Machine) Enroll() error

TODO(adam): perform rollbacks if enroll fails

func (*Machine) Init

func (n *Machine) Init() error

func (*Machine) MachinistCommon

func (n *Machine) MachinistCommon() *config.Common

type NodeModifier

type NodeModifier func(node *Machine) error

func WithAuthFlags

func WithAuthFlags(af *client.AuthFlags) NodeModifier

func WithConfig

func WithConfig(node *config.Node) NodeModifier

func WithDialFunc

func WithDialFunc(f func() (*grpc.ClientConn, error)) NodeModifier

func WithIps

func WithIps(ips []string) NodeModifier

func WithMachinistFlags

func WithMachinistFlags(mods ...config.CommonModifier) NodeModifier

func WithName

func WithName(name string) NodeModifier

func WithTags

func WithTags(tags []string) NodeModifier

type NssConf

type NssConf struct {
	DefaultShell string
	Shells       []struct {
		Home  string
		Shell string
		Match string
	}
}

type SystemdDConfig

type SystemdDConfig struct {
	User        string
	InstallPath string
	Command     string
}

Directories

Path Synopsis
Package assets is empty here because this package contains only embedded assets; having a source file here helps `go get -u ./...` to not error.
Package assets is empty here because this package contains only embedded assets; having a source file here helps `go get -u ./...` to not error.

Jump to

Keyboard shortcuts

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