Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunInterruptHandler

func RunInterruptHandler(m *RunManager)

    RunInterruptHandler runs an interrupt handler ontop of the RunManager.

    func RunServices

    func RunServices(services []Service)

      RunServices starts up all given services.

      Types

      type RunManager

      type RunManager struct {
      	Context              context.Context
      	WaitingGroupShutdown *sync.WaitGroup
      	ErrChan              chan<- error
      	Cancel               func()
      }

        RunManager can Run services while managing startup and Shutdown.

        func (*RunManager) Run

        func (m *RunManager) Run(r *Runner)

          Run runs the Runner.

          func (*RunManager) RunInterruptHandler

          func (m *RunManager) RunInterruptHandler()

            RunInterruptHandler runs an interrupt handler ontop of the RunManager.

            type Runner

            type Runner struct {
            	Run      func() error
            	Shutdown func() error
            }

              Runner incorporates a Run and a Shutdown method to control a service.

              type Service

              type Service func(m *RunManager)

                Service is a runnable service.

                Source Files

                Directories

                Path Synopsis
                runnables
                sshtunnel/sshtunnelcmd
                Package runs ssh tunnels.
                Package runs ssh tunnels.