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 ¶
- func Serve(caFile, certFile, keyFile string, bind net.IP, port int)
- type Minion
- func (s *Minion) Delete(ctx context.Context, req *pb.DeleteRequest) (*pb.DeleteResult, error)
- func (s *Minion) Directory(ctx context.Context, req *pb.FileRequest) (*pb.DirectoryResult, error)
- func (s *Minion) Exec(ctx context.Context, req *pb.ExecRequest) (*pb.ExecResult, error)
- func (s *Minion) Exit(ctx context.Context, req *pb.Empty) (*pb.Empty, error)
- func (s *Minion) File(ctx context.Context, req *pb.FileRequest) (*pb.FileResult, error)
- func (s *Minion) LineInFile(ctx context.Context, req *pb.LineInFileRequest) (*pb.LineInFileResult, error)
- func (s *Minion) Stat(ctx context.Context, req *pb.FilePath) (*pb.StatResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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)