zeus

package
Version: v3.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: LGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(ctx plugin.Context) error

Check check zeus plugin optins

func Err

func Err(err error, msg string, code int) error

Err 创建错误

func GetJSON

func GetJSON(obj interface{}) []byte

GetJSON 获取json

func New

func New(ctx plugin.Context) (plugin.Plugin, error)

New create zeus plugin

Types

type HostMaping

type HostMaping struct {
	Host            string `json:"host"`
	CertificateName string `json:"certificate"`
}

type PoolBasic

type PoolBasic struct {
	BandwidthClass string      `json:"bandwidth_class"`
	Monitors       []string    `json:"monitors"`
	NodesTable     []*ZeusNode `json:"nodes_table"`
	FailurePool    string      `json:"failure_pool"`
	Note           string      `json:"note"`
}

type PoolConnection

type PoolConnection struct {
	MaxReplyTime int `json:"max_reply_time"`
}

type PoolProperties

type PoolProperties struct {
	Basic      PoolBasic      `json:"basic"`
	Connection PoolConnection `json:"connection"`
}

type Properties

type Properties interface {
}

type SSL

type SSL struct {
	Note    string `json:"note"`
	Private string `json:"private"`
	Public  string `json:"public"`
	Request string `json:"request"`
}

type SSLProperties

type SSLProperties struct {
	Basic SSL `json:"basic"`
}

type Source

type Source struct {
	Properties Properties `json:"properties"`
}

Source zeus资源模型

func (Source) GetJSON

func (z Source) GetJSON() ([]byte, error)

GetJSON 序列化json

type VSBasic

type VSBasic struct {
	AddXForwardedFor bool     `json:"add_x_forwarded_for"`
	ListenONAny      bool     `json:"listen_on_any"`
	ListenONHosts    []string `json:"listen_on_hosts,omitempty"`
	Note             string   `json:"note"`
	DefaultPoolName  string   `json:"pool"`
	Port             int32    `json:"port"`
	Enabled          bool     `json:"enabled"`
	Protocol         string   `json:"protocol"` //stream http https 等等
	RequestRules     []string `json:"request_rules,omitempty"`
	ResponseRules    []string `json:"response_rules,omitempty"`
	SSLDecrypt       bool     `json:"ssl_decrypt"`
	ConnectTimeout   int      `json:"connect_timeout"`
}

type VSProperties

type VSProperties struct {
	Basic VSBasic `json:"basic"`
	SSL   VSssl   `json:"ssl"`
	Log   VsLog   `json:"log"`
}

type VSssl

type VSssl struct {
	ServerCertDefault     string        `json:"server_cert_default,omitempty"`
	ServerCertHostMapping []*HostMaping `json:"server_cert_host_mapping"`
}

VSssl 虚拟服务ssl配置

type VsLog

type VsLog struct {
	Enabled                  bool   `json:"enabled"`
	Filename                 string `json:"filename"`
	Format                   string `json:"format"`
	SSLFailures              bool   `json:"ssl_failures"`
	ClientConnectionFailures bool   `json:"client_connection_failures"`
}

type ZeusError

type ZeusError struct {
	Code    int
	Message string
	Err     error
}

func (*ZeusError) Error

func (e *ZeusError) Error() string

type ZeusNode

type ZeusNode struct {
	Node   string `json:"node"`
	State  string `json:"state"`
	Weight int    `json:"weight"`
}

type ZeusRules

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

func CreateHTTPRule

func CreateHTTPRule(rules []*object.RuleObject) ZeusRules

CreateHTTPRule http rule list

func CreateHTTPSRule

func CreateHTTPSRule(rules []*object.RuleObject) ZeusRules

CreateHTTPSRule https rule list

func (ZeusRules) Bytes

func (z ZeusRules) Bytes() []byte

Bytes return rule script

func (ZeusRules) Name

func (z ZeusRules) Name() string

Name return rule list name

func (ZeusRules) String

func (z ZeusRules) String() string

Jump to

Keyboard shortcuts

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