istio

package
v0.0.0-...-e435e13 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BreakType    = "destination-policy"
	BreakVersion = "v1alpha2"
	BreakGroup   = "config.istio.io"
	BreakDomain  = "cluster"
)
View Source
const (
	EgressType          = "egress-rule"
	EgressVersion       = "v1alpha2"
	EgressGroup         = "config.istio.io"
	EgressDomain        = "cluster"
	EgressProtocolHttp  = "HTTP"
	EgressProtocolHttps = "HTTPS"
	EgressProtocolGrpc  = "GRPC"
	EgressProtocolHttp2 = "HTTP2"
	EgressProtocolTcp   = "TCP"
	EgressProtocolMongo = "MONGO"
)
View Source
const (
	RouterType    = "route-rule"
	RouterVersion = "v1alpha2"
	RouterGroup   = "config.istio.io"
	RouterDomain  = "cluster"
)

Variables

View Source
var EgressProtocol = [...]string{"HTTP", "HTTPS", "GRPC", "HTTP2", "TCP", "MONGO"}

HTTP|HTTPS|GRPC|HTTP2|TCP|MONGO

View Source
var Typ = [5]string{"route-rule", "egress-rule", "destination-policy", "quota-spec"}

Functions

func NewClient

func NewClient() (*crd.Client, error)

Types

type Client

type Client struct {
	Type            int64             `json:"type"`
	FullName        string            `json:"full_name"`
	Version         string            `json:"version"`
	Name            string            `json:"name"`
	Namespace       string            `json:"namespace"`
	Group           string            `json:"group"`
	Labels          map[string]string `json:"labels"`
	Annotations     map[string]string `json:"annotations"`
	Domain          string            `json:"domain"`
	ResourceVersion string            `json:"resource_version"`
	Crd             *crd.Client
}

func (*Client) Delete

func (c *Client) Delete(typ string) error

func (*Client) Get

func (c *Client) Get(typ string) (*model.Config, bool)

type Destination

type Destination struct {
	Client
	MaxConnections               int32 `json:"max_connections"`
	HttpMaxPendingRequests       int32 `json:"http_max_pending_requests"`
	SleepWindow                  int64 `json:"sleep_window"`
	HttpDetectionInterval        int64 `json:"http_detection_interval"`
	HttpMaxEjectionPercent       int32 `json:"http_max_ejection_percent"`
	HttpConsecutiveErrors        int32 `json:"http_consecutive_errors"`
	HttpMaxRequestsPerConnection int32 `json:"http_max_requests_per_connection"`
}

func (*Destination) Create

func (d *Destination) Create() (string, error)

type Egress

type Egress struct {
	Client
	Destination string `json:"destination"`
	Port        int32  `json:"port"`
	Protocol    string `json:"protocol"`
}

func (*Egress) Create

func (e *Egress) Create() (string, error)

type Injector

type Injector struct {
	Version             string `json:"version"`
	Namespace           string `json:"namespace"`
	DockerHub           string `json:"docker_hub"`
	MeshConfigFile      string `json:"mesh_config_file"`
	InjectConfigFile    string `json:"inject_config_file"`
	MeshConfigMapName   string `json:"mesh_config_map_name"`
	InjectConfigMapName string `json:"inject_config_map_name"`
	DebugMode           bool   `json:"debug_mode"`
	SidecarProxyUID     uint64 `json:"sidecar_proxy_uid"`
	Verbosity           int    `json:"verbosity"`
	EnableCoreDump      bool   `json:"enable_core_dump"`
	ImagePullPolicy     string `json:"image_pull_policy"`
	IncludeIPRanges     string `json:"includeIPRanges"`
	ExcludeIPRanges     string `json:"exclude_ip_ranges"`
	IncludeInboundPorts string `json:"include_inbound_ports"`
	ExcludeInboundPorts string `json:"exclude_inbound_ports"`
	SidecarTemplate     string `json:"sidecar_template"`
}

func (*Injector) Inject

func (i *Injector) Inject(in interface{}) (interface{}, error)

type RouterRule

type RouterRule struct {
	Client
	Route          []*routing.DestinationWeight `json:"route"`
	HttpFault      *routing.HTTPFaultInjection  `json:"http_fault"`
	HttpReqTimeout *routing.HTTPTimeout         `json:"http_req_timeout"`
	Timeout        int64                        `json:"timeout"`
	Percent        float32                      `json:"percent"`
	FixedDelay     int64                        `json:"fixed_delay"`
}

func (*RouterRule) Create

func (rr *RouterRule) Create() (string, error)

create route rule

func (*RouterRule) GetConfig

func (rr *RouterRule) GetConfig() (model.Config, error)

Obtain config

Jump to

Keyboard shortcuts

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