minion

package
v0.0.0-...-3da3ec5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package minion implements the remote side of the gofigure configuration management tool.

It includes functions for creating and deleting files and directories, as well as process execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(caFile, certFile, keyFile string, bind net.IP, port int)

Serve listens for incoming client connections.

Types

type Minion

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

Minion implements the remote side of the gofigure service.

func (*Minion) Delete

func (s *Minion) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResult, error)

Delete removes the specified file or directory, optionally recursively.

func (*Minion) Directory

func (s *Minion) Directory(ctx context.Context, req *pb.FileRequest) (*pb.DirectoryResult, error)

Directory creates a directory with the specified mode, uid, and gid.

func (*Minion) Exec

func (s *Minion) Exec(ctx context.Context, req *pb.ExecRequest) (*pb.ExecResult, error)

Exec executes a command specified in an ExecRequest and returns the resulting ReturnCode, Stdout, and Stderr in an ExecResult.

func (*Minion) Exit

func (s *Minion) Exit(ctx context.Context, req *pb.Empty) (*pb.Empty, error)

Exit gracefully stops the grpc server. It does not wait for shutdown to complete before returning.

func (*Minion) File

func (s *Minion) File(ctx context.Context, req *pb.FileRequest) (*pb.FileResult, error)

File creates a file with the specified mode, uid, gid, and contents.

func (*Minion) LineInFile

func (s *Minion) LineInFile(ctx context.Context, req *pb.LineInFileRequest) (*pb.LineInFileResult, error)

func (*Minion) Stat

func (s *Minion) Stat(ctx context.Context, req *pb.FilePath) (*pb.StatResult, error)

Stat retrieves properties of a file or directory.

Jump to

Keyboard shortcuts

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