app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultXDSClusterName             = "xds-api"
	DefaultXDSClusterRefreshDelayMS   = 10000
	DefaultXDSClusterConnectTimeoutMS = 250
	DefaultXDSClusterConnectTimeout   = "0.25s"
)

Variables

View Source
var RootCmd = &cobra.Command{
	Use:  "prepare-envoy",
	Args: cobra.ExactArgs(0),
	Run: func(cmd *cobra.Command, args []string) {
		env, err := parseEnv()
		if err != nil {
			panic(err)
		}

		err = addIPTableRedirects(env)
		if err != nil {
			panic(err)
		}

		err = outputEnvoyConfig(env)
		if err != nil {
			panic(err)
		}
	},
}

RootCmd represents the base command when called without any subcommands FIXME(kevindrosendahl): convert this to pkg/util/cli

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type XDSV1Admin

type XDSV1Admin struct {
	AccessLogPath string `json:"access_log_path"`
	Address       string `json:"address"`
}

type XDSV1BootstrapConfig

type XDSV1BootstrapConfig struct {
	Listeners      []string            `json:"listeners"`
	LDS            XDSV1LDS            `json:"lds"`
	Admin          XDSV1Admin          `json:"admin"`
	ClusterManager XDSV1ClusterManager `json:"cluster_manager"`
}

type XDSV1CDS

type XDSV1CDS struct {
	Cluster        XDSV1Cluster `json:"cluster"`
	RefreshDelayMS int          `json:"refresh_delay_ms"`
}

type XDSV1Cluster

type XDSV1Cluster struct {
	Name             string      `json:"name"`
	ConnectTimeoutMS int         `json:"connect_timeout_ms"`
	Type             string      `json:"type"`
	LBType           string      `json:"lb_type"`
	Hosts            []XDSV1Host `json:"hosts"`
}

type XDSV1ClusterManager

type XDSV1ClusterManager struct {
	Clusters []XDSV1Cluster `json:"clusters"`
	CDS      XDSV1CDS       `json:"cds"`
	SDS      XDSV1SDS       `json:"sds"`
}

type XDSV1Host

type XDSV1Host struct {
	URL string `json:"url"`
}

type XDSV1LDS

type XDSV1LDS struct {
	Cluster        string `json:"cluster"`
	RefreshDelayMS int    `json:"refresh_delay_ms"`
}

type XDSV1SDS

type XDSV1SDS struct {
	Cluster        XDSV1Cluster `json:"cluster"`
	RefreshDelayMS int          `json:"refresh_delay_ms"`
}

type XDSV2ADSConfig

type XDSV2ADSConfig struct {
	APIType      string             `json:"api_type"`
	GRPCServices []XDSV2GRPCService `json:"grpc_services"`
}

type XDSV2Address

type XDSV2Address struct {
	SocketAddress XDSV2SocketAddress `json:"socket_address"`
}

type XDSV2Admin

type XDSV2Admin struct {
	AccessLogPath string       `json:"access_log_path"`
	Address       XDSV2Address `json:"address"`
}

type XDSV2BootstrapConfig

type XDSV2BootstrapConfig struct {
	Node             XDSV2Node             `json:"node"`
	Admin            XDSV2Admin            `json:"admin"`
	StaticResources  XDSV2StaticResources  `json:"static_resources"`
	DynamicResources XDSV2DynamicResources `json:"dynamic_resources"`
}

type XDSV2CDSConfig

type XDSV2CDSConfig struct {
	ADS struct{} `json:"ads"`
}

type XDSV2Cluster

type XDSV2Cluster struct {
	Name                 string      `json:"name"`
	ConnectTimeout       string      `json:"connect_timeout"`
	Type                 string      `json:"type"`
	LBPolicy             string      `json:"lb_policy"`
	HTTP2ProtocolOptions struct{}    `json:"http2_protocol_options"`
	Hosts                []XDSV2Host `json:"hosts"`
}

type XDSV2DynamicResources

type XDSV2DynamicResources struct {
	ADSConfig XDSV2ADSConfig `json:"ads_config"`
	LDSConfig XDSV2LDSConfig `json:"lds_config"`
	CDSConfig XDSV2CDSConfig `json:"cds_config"`
}

type XDSV2EnvoyGRPC

type XDSV2EnvoyGRPC struct {
	ClusterName string `json:"cluster_name"`
}

type XDSV2GRPCService

type XDSV2GRPCService struct {
	EnvoyGRPC XDSV2EnvoyGRPC `json:"envoy_grpc"`
}

type XDSV2Host

type XDSV2Host struct {
	SocketAddress XDSV2SocketAddress `json:"socket_address"`
}

type XDSV2LDSConfig

type XDSV2LDSConfig struct {
	ADS struct{} `json:"ads"`
}

type XDSV2Node

type XDSV2Node struct {
	Id      string `json:"id"`
	Cluster string `json:"cluster"`
}

type XDSV2SocketAddress

type XDSV2SocketAddress struct {
	Address   string `json:"address"`
	PortValue int    `json:"port_value"`
}

type XDSV2StaticResources

type XDSV2StaticResources struct {
	Clusters []XDSV2Cluster `json:"clusters"`
}

Jump to

Keyboard shortcuts

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