local

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerConfig

type HandlerConfig struct {
	CliAddr    string
	BinapiAddr string
	StatsAddr  string
}

HandlerConfig defines config parameters for ProcessHandler.

func DefaultConfig

func DefaultConfig() HandlerConfig

DefaultConfig returns config set to default values.

type ProcessHandler

type ProcessHandler struct {
	HandlerConfig
	// contains filtered or unexported fields
}

ProcessHandler is a handler for local instance.

func NewHandler

func NewHandler(pid int, config HandlerConfig) *ProcessHandler

NewHandler returns a new handler for a local instance specified by PID.

func (*ProcessHandler) Close

func (h *ProcessHandler) Close() error

func (*ProcessHandler) Command

func (h *ProcessHandler) Command(cmd string, args ...string) exec.Cmd

func (*ProcessHandler) GetAPI

func (h *ProcessHandler) GetAPI() (govppapi.Channel, error)

func (*ProcessHandler) GetCLI

func (h *ProcessHandler) GetCLI() (probe.CliExecutor, error)

func (*ProcessHandler) GetStats

func (h *ProcessHandler) GetStats() (govppapi.StatsProvider, error)

func (*ProcessHandler) ID

func (h *ProcessHandler) ID() string

func (*ProcessHandler) Metadata

func (h *ProcessHandler) Metadata() map[string]string

type Provider

type Provider struct {
	Config HandlerConfig
}

Provider manages locally running instances.

func NewProvider

func NewProvider(config HandlerConfig) *Provider

func (*Provider) Env

func (p *Provider) Env() string

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Query

func (p *Provider) Query(params ...map[string]string) ([]probe.Handler, error)

Jump to

Keyboard shortcuts

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