istio: istio.io/istio/galley/pkg/server/process Index | Files

package process

import "istio.io/istio/galley/pkg/server/process"

Index

Package Files

component.go host.go

type Component Uses

type Component interface {
    // Start the component. If the component succeeds in starting, then it should complete its initialization by the
    // time Start returns.
    Start() error

    // Stop the component. When called multiple times, Stop should stop the component idempotently. By the time Stop()
    // returns control, the Component should cease all background operations.
    Stop()
}

Component of a running process.

func ComponentFromFns Uses

func ComponentFromFns(startFn func() error, stopFn func()) Component

ComponentFromFns creates a component from functions.

type Host Uses

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

Host is a process host that takes care of start/stop of sub-components.

func (*Host) Add Uses

func (h *Host) Add(c Component)

Add a new component to this host. It panics if the host is already started.

func (*Host) Start Uses

func (h *Host) Start() error

Start the process.Host. If any of the components starts to fail, then an error is returned. If there is an error then all successfully started components will be stopped before control is returned.

func (*Host) Stop Uses

func (h *Host) Stop()

Stop the Host. All components will be stopped, before the control is returned.

Package process imports 2 packages (graph) and is imported by 4 packages. Updated 2019-07-21. Refresh now. Tools for package owners.