agent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StatusNotRunning not running status
	StatusNotRunning = iota
	// StatusRunning running status
	StatusRunning
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	AdminPath string

	Config        config.ReadWriter
	VarnishConfig *VarnishConfig
	// contains filtered or unexported fields
}

Agent varnish agent

func NewAgent

func NewAgent(uri string) (*Agent, error)

NewAgent create an agent

func (*Agent) GetDirectors

func (ins *Agent) GetDirectors() (s director.Directors, err error)

GetDirectors get directors

func (*Agent) GetVcl

func (ins *Agent) GetVcl() (vcl string, err error)

GetVcl get vcl

func (*Agent) IsRunning

func (ins *Agent) IsRunning() bool

IsRunning is running

func (*Agent) ReloadVcl

func (ins *Agent) ReloadVcl() (err error)

ReloadVcl reload vcl

func (*Agent) Save

func (ins *Agent) Save(s director.Directors) (err error)

Save save directors to vcl

func (*Agent) Start

func (ins *Agent) Start() (err error)

Start start varnish

type VarnishConfig

type VarnishConfig struct {
	Pid        int      `json:"pid,omitempty"`
	Args       []string `json:"args,omitempty"`
	Version    string   `json:"version,omitempty"`
	File       string   `json:"file,omitempty"`
	Hash       string   `json:"hash,omitempty"`
	StartedAt  string   `json:"startedAt,omitempty"`
	ReloadedAt string   `json:"reloadedAt,omitempty"`
}

VarnishConfig vcl config

Jump to

Keyboard shortcuts

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