Documentation
¶
Index ¶
- type CleanArgs
- type CleanResponse
- type InfoArgs
- type InfoResponse
- type ListArgs
- type ListResponse
- type LoadServicesArgs
- type LoadServicesResponse
- type RemoveFailure
- type RunArgs
- type RunResponse
- type Server
- func (s *Server) Clean(args CleanArgs, reply *CleanResponse) (err error)
- func (s *Server) Exit(_ bool, _ *bool) (err error)
- func (s *Server) Info(args *InfoArgs, reply *InfoResponse) (err error)
- func (s *Server) Init(_ bool, _ *bool) error
- func (s *Server) List(args *ListArgs, reply *ListResponse) (err error)
- func (s *Server) LoadServices(args LoadServicesArgs, reply *LoadServicesResponse) (err error)
- func (s *Server) Run(args *RunArgs, reply *RunResponse) (err error)
- func (s *Server) Start(args StartArgs, reply *StartResponse) (err error)
- func (s *Server) Stop(args StopArgs, reply *StopResponse) (err error)
- func (s *Server) Tail(args *TailArgs, reply *TailResponse) (err error)
- func (s *Server) Version(_ bool, reply *VersionResponse) (err error)
- func (s *Server) Wait(args *WaitArgs, reply *WaitResponse) (err error)
- type StartArgs
- type StartResponse
- type StopArgs
- type StopResponse
- type TailArgs
- type TailResponse
- type VersionResponse
- type WaitArgs
- type WaitResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanResponse ¶
type CleanResponse struct {
Cleaned []service.Info
Failed []RemoveFailure
}
CleanResponse -
type ListArgs ¶
type ListArgs struct {
// If true, only running services are listed
Running bool
// If true, only temporary services are listed
Temp bool
}
ListArgs -
type LoadServicesResponse ¶
type LoadServicesResponse struct {
NewServices []service.Info
UpdatedServices []service.Info
DeprecatedServices []service.Info
RemovedServices []string
}
LoadServicesResponse -
type RunArgs ¶
type RunArgs struct {
Name string
Program string
Args []string
Dir string
Env map[string]string
CleanAfter time.Duration
}
RunArgs -
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the backend that manages services
func (*Server) Clean ¶
func (s *Server) Clean(args CleanArgs, reply *CleanResponse) (err error)
Clean will start a new, temp service
func (*Server) Info ¶
func (s *Server) Info(args *InfoArgs, reply *InfoResponse) (err error)
Info gets info about service
func (*Server) List ¶
func (s *Server) List(args *ListArgs, reply *ListResponse) (err error)
List returns a list of services
func (*Server) LoadServices ¶
func (s *Server) LoadServices(args LoadServicesArgs, reply *LoadServicesResponse) (err error)
LoadServices will start a new, temp service
func (*Server) Run ¶
func (s *Server) Run(args *RunArgs, reply *RunResponse) (err error)
Run will start a new, temp service
func (*Server) Start ¶
func (s *Server) Start(args StartArgs, reply *StartResponse) (err error)
Start runs a service, if it's stopped
func (*Server) Stop ¶
func (s *Server) Stop(args StopArgs, reply *StopResponse) (err error)
Stop stops a service, if it's running
func (*Server) Tail ¶
func (s *Server) Tail(args *TailArgs, reply *TailResponse) (err error)
Tail gets lines of output since a line index for stdout and/or stderr
type StopArgs ¶
type StopArgs struct {
Name string
// Time to wait between escalation signals to the service's process
EscalationInterval time.Duration
}
StopArgs -
type TailArgs ¶
type TailArgs struct {
// Name of service to get output from
Name string
// If specified, restrict output to this pid
Pid int
// Max num lines to include
MaxLines int
// Index to start at, from a previous call, or a negative index to mean
// that may from the end in reverse.
Index int
// If false, whatever output is available will be returned. Otherwise,
// the call will wait for some output before returning. If pid != 0 and
// that process is done with output, the call will return, even if there
// isn't any output, and EOF will be true.
Follow bool
}
TailArgs -
type TailResponse ¶
type TailResponse struct {
// Output lines
Lines []service.OutputLine
// True if the pid asked for is done outputting. If no pid was given,
// true if tail has reached end of whatever is currently available.
EOF bool
// Index & pid to use for a followup call to resume from the next line
// of output.
NextIndex int
NextPid int
}
TailResponse -
Click to show internal directories.
Click to hide internal directories.