视频讲解:Envoy手把手入门视频讲解

动态配置在 go-control-plane 中的定义

go-control-plane 中的配置定义与 API 文档 中给出的相同,以 listener 为例:

api 文档中的 listeners

{
  "name": "...",
  "address": "{...}",
  "filter_chains": [],
  "use_original_dst": "{...}",
  "per_connection_buffer_limit_bytes": "{...}",
  "metadata": "{...}",
  "drain_type": "...",
  "listener_filters": [],
  "listener_filters_timeout": "{...}",
  "transparent": "{...}",
  "freebind": "{...}",
  "socket_options": [],
  "tcp_fast_open_queue_length": "{...}",
  "traffic_direction": "..."
}

对应 go-control-plane 在 envoy/api/v2/lds.pb.go 中实现的 Listener:

type Listener struct {
    Name string 
    Address *core.Address 
    FilterChains []*listener.FilterChain 
    UseOriginalDst *types.BoolValue  
    PerConnectionBufferLimitBytes *types.UInt32Value 
    Metadata *core.Metadata 
    DeprecatedV1 *Listener_DeprecatedV1 
    DrainType Listener_DrainType 
    ListenerFilters []*listener.ListenerFilter 
    ListenerFiltersTimeout *time.Duration 
    Transparent *types.BoolValue 
    Freebind *types.BoolValue 
    SocketOptions []*core.SocketOption 
    TcpFastOpenQueueLength *types.UInt32Value 
    XXX_NoUnkeyedLiteral   struct{}           
    XXX_unrecognized       []byte             
    XXX_sizecache          int32              
}

参考