Documentation ¶
Index ¶
- Variables
- func NewApiEventLoop(emitter ApiEmitter, syncer ApiSyncer) eventloop.EventLoop
- func NewApiSimpleEventLoop(emitter ApiSimpleEmitter, syncers ...ApiSyncer) eventloop.SimpleEventLoop
- type ApiEmitter
- type ApiSimpleEmitter
- type ApiSnapshot
- type ApiSnapshotStringer
- type ApiSyncDeciderdeprecated
- type ApiSyncDeciderWithContext
- type ApiSyncer
- type ApiSyncers
- type Gateway
- func (o *Gateway) DeepCopyObject() runtime.Object
- func (*Gateway) Descriptor() ([]byte, []int)
- func (this *Gateway) Equal(that interface{}) bool
- func (m *Gateway) GetBindAddress() string
- func (m *Gateway) GetBindPort() uint32
- func (m *Gateway) GetGatewayProxyName() string
- func (m *Gateway) GetGatewayType() isGateway_GatewayType
- func (m *Gateway) GetHttpGateway() *HttpGateway
- func (m *Gateway) GetMetadata() core.Metadata
- func (o *Gateway) GetObjectKind() schema.ObjectKind
- func (m *Gateway) GetPlugins() *v1.ListenerPlugins
- func (m *Gateway) GetSsl() bool
- func (m *Gateway) GetStatus() core.Status
- func (m *Gateway) GetTcpGateway() *TcpGateway
- func (m *Gateway) GetUseProxyProto() *types.BoolValue
- func (r *Gateway) GroupVersionKind() schema.GroupVersionKind
- func (r *Gateway) Hash() uint64
- func (*Gateway) ProtoMessage()
- func (m *Gateway) Reset()
- func (r *Gateway) SetMetadata(meta core.Metadata)
- func (r *Gateway) SetStatus(status core.Status)
- func (m *Gateway) String() string
- func (m *Gateway) XXX_DiscardUnknown()
- func (m *Gateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Gateway) XXX_Merge(src proto.Message)
- func (*Gateway) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- func (m *Gateway) XXX_Size() int
- func (m *Gateway) XXX_Unmarshal(b []byte) error
- type GatewayClient
- type GatewayList
- func (list GatewayList) AsInputResources() resources.InputResourceList
- func (list GatewayList) AsInterfaces() []interface{}
- func (list GatewayList) AsResources() resources.ResourceList
- func (list GatewayList) Clone() GatewayList
- func (list GatewayList) Each(f func(element *Gateway))
- func (list GatewayList) EachResource(f func(element resources.Resource))
- func (list GatewayList) Find(namespace, name string) (*Gateway, error)
- func (list GatewayList) Names() []string
- func (list GatewayList) NamespacesDotNames() []string
- func (list GatewayList) Sort() GatewayList
- type GatewayReconciler
- type GatewayWatcher
- type Gateway_HttpGateway
- type Gateway_TcpGateway
- type HttpGateway
- func (*HttpGateway) Descriptor() ([]byte, []int)
- func (this *HttpGateway) Equal(that interface{}) bool
- func (m *HttpGateway) GetPlugins() *v1.HttpListenerPlugins
- func (m *HttpGateway) GetVirtualServices() []core.ResourceRef
- func (*HttpGateway) ProtoMessage()
- func (m *HttpGateway) Reset()
- func (m *HttpGateway) String() string
- func (m *HttpGateway) XXX_DiscardUnknown()
- func (m *HttpGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HttpGateway) XXX_Merge(src proto.Message)
- func (m *HttpGateway) XXX_Size() int
- func (m *HttpGateway) XXX_Unmarshal(b []byte) error
- type TcpGateway
- func (*TcpGateway) Descriptor() ([]byte, []int)
- func (this *TcpGateway) Equal(that interface{}) bool
- func (m *TcpGateway) GetDestinations() []*v1.TcpHost
- func (m *TcpGateway) GetPlugins() *v1.TcpListenerPlugins
- func (*TcpGateway) ProtoMessage()
- func (m *TcpGateway) Reset()
- func (m *TcpGateway) String() string
- func (m *TcpGateway) XXX_DiscardUnknown()
- func (m *TcpGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TcpGateway) XXX_Merge(src proto.Message)
- func (m *TcpGateway) XXX_Size() int
- func (m *TcpGateway) XXX_Unmarshal(b []byte) error
- type TransitionGatewayFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GatewayCrd = crd.NewCrd( "gateways", GatewayGVK.Group, GatewayGVK.Version, GatewayGVK.Kind, "gw", false, &Gateway{}) )
View Source
var (
GatewayGVK = schema.GroupVersionKind{
Version: "v2",
Group: "gateway.solo.io.v2",
Kind: "Gateway",
}
)
Functions ¶
func NewApiEventLoop ¶
func NewApiEventLoop(emitter ApiEmitter, syncer ApiSyncer) eventloop.EventLoop
func NewApiSimpleEventLoop ¶
func NewApiSimpleEventLoop(emitter ApiSimpleEmitter, syncers ...ApiSyncer) eventloop.SimpleEventLoop
Types ¶
type ApiEmitter ¶
type ApiEmitter interface { Register() error VirtualService() gateway_solo_io.VirtualServiceClient Gateway() GatewayClient Snapshots(watchNamespaces []string, opts clients.WatchOpts) (<-chan *ApiSnapshot, <-chan error, error) }
func NewApiEmitter ¶
func NewApiEmitter(virtualServiceClient gateway_solo_io.VirtualServiceClient, gatewayClient GatewayClient) ApiEmitter
func NewApiEmitterWithEmit ¶
func NewApiEmitterWithEmit(virtualServiceClient gateway_solo_io.VirtualServiceClient, gatewayClient GatewayClient, emit <-chan struct{}) ApiEmitter
type ApiSimpleEmitter ¶
type ApiSimpleEmitter interface {
Snapshots(ctx context.Context) (<-chan *ApiSnapshot, <-chan error, error)
}
func NewApiSimpleEmitter ¶
func NewApiSimpleEmitter(aggregatedWatch clients.ResourceWatch) ApiSimpleEmitter
func NewApiSimpleEmitterWithEmit ¶
func NewApiSimpleEmitterWithEmit(aggregatedWatch clients.ResourceWatch, emit <-chan struct{}) ApiSimpleEmitter
type ApiSnapshot ¶
type ApiSnapshot struct { VirtualServices gateway_solo_io.VirtualServiceList Gateways GatewayList }
func (ApiSnapshot) Clone ¶
func (s ApiSnapshot) Clone() ApiSnapshot
func (ApiSnapshot) Hash ¶
func (s ApiSnapshot) Hash() uint64
func (ApiSnapshot) HashFields ¶
func (s ApiSnapshot) HashFields() []zap.Field
func (ApiSnapshot) Stringer ¶
func (s ApiSnapshot) Stringer() ApiSnapshotStringer
type ApiSnapshotStringer ¶
func (ApiSnapshotStringer) String ¶
func (ss ApiSnapshotStringer) String() string
type ApiSyncDecider
deprecated
type ApiSyncDecider interface { ApiSyncer ShouldSync(old, new *ApiSnapshot) bool }
Deprecated: use ApiSyncDeciderWithContext
type ApiSyncDeciderWithContext ¶
type ApiSyncDeciderWithContext interface { ApiSyncer ShouldSync(ctx context.Context, old, new *ApiSnapshot) bool }
type ApiSyncers ¶
type ApiSyncers []ApiSyncer
func (ApiSyncers) Sync ¶
func (s ApiSyncers) Sync(ctx context.Context, snapshot *ApiSnapshot) error
type Gateway ¶
type Gateway struct { // if set to false, only use virtual services with no ssl configured. // if set to true, only use virtual services with ssl configured. Ssl bool `protobuf:"varint,1,opt,name=ssl,proto3" json:"ssl,omitempty"` // the bind address the gateway should serve traffic on BindAddress string `protobuf:"bytes,3,opt,name=bind_address,json=bindAddress,proto3" json:"bind_address,omitempty"` // bind ports must not conflict across gateways in a namespace BindPort uint32 `protobuf:"varint,4,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"` // top level plugin configuration for all routes on the gateway Plugins *v1.ListenerPlugins `protobuf:"bytes,5,opt,name=plugins,proto3" json:"plugins,omitempty"` // Status indicates the validation status of this resource. // Status is read-only by clients, and set by gloo during validation Status core.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status" testdiff:"ignore"` // Metadata contains the object metadata for this resource Metadata core.Metadata `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata"` // Enable ProxyProtocol support for this listener UseProxyProto *types.BoolValue `protobuf:"bytes,8,opt,name=use_proxy_proto,json=useProxyProto,proto3" json:"use_proxy_proto,omitempty"` // The type of gateway being created // HttpGateway creates a listener with an http_connection_manager // TcpGateway creates a listener with a tcp proxy filter // // Types that are valid to be assigned to GatewayType: // *Gateway_HttpGateway // *Gateway_TcpGateway GatewayType isGateway_GatewayType `protobuf_oneof:"GatewayType"` GatewayProxyName string `protobuf:"bytes,11,opt,name=gateway_proxy_name,json=gatewayProxyName,proto3" json:"gateway_proxy_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A gateway describes the routes to upstreams that are reachable via a specific port on the Gateway Proxy itself.
func NewGateway ¶
func (*Gateway) DeepCopyObject ¶
func (*Gateway) Descriptor ¶
func (*Gateway) GetBindAddress ¶
func (*Gateway) GetBindPort ¶
func (*Gateway) GetGatewayProxyName ¶
func (*Gateway) GetGatewayType ¶
func (m *Gateway) GetGatewayType() isGateway_GatewayType
func (*Gateway) GetHttpGateway ¶
func (m *Gateway) GetHttpGateway() *HttpGateway
func (*Gateway) GetMetadata ¶
func (*Gateway) GetObjectKind ¶
func (o *Gateway) GetObjectKind() schema.ObjectKind
func (*Gateway) GetPlugins ¶
func (m *Gateway) GetPlugins() *v1.ListenerPlugins
func (*Gateway) GetTcpGateway ¶
func (m *Gateway) GetTcpGateway() *TcpGateway
func (*Gateway) GetUseProxyProto ¶
func (*Gateway) GroupVersionKind ¶
func (r *Gateway) GroupVersionKind() schema.GroupVersionKind
func (*Gateway) ProtoMessage ¶
func (*Gateway) ProtoMessage()
func (*Gateway) SetMetadata ¶
func (*Gateway) XXX_DiscardUnknown ¶
func (m *Gateway) XXX_DiscardUnknown()
func (*Gateway) XXX_Marshal ¶
func (*Gateway) XXX_OneofFuncs ¶
func (*Gateway) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
func (*Gateway) XXX_Unmarshal ¶
type GatewayClient ¶
type GatewayClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*Gateway, error) Write(resource *Gateway, opts clients.WriteOpts) (*Gateway, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (GatewayList, error) GatewayWatcher }
func NewGatewayClient ¶
func NewGatewayClient(rcFactory factory.ResourceClientFactory) (GatewayClient, error)
func NewGatewayClientWithBase ¶
func NewGatewayClientWithBase(rc clients.ResourceClient) GatewayClient
func NewGatewayClientWithToken ¶
func NewGatewayClientWithToken(rcFactory factory.ResourceClientFactory, token string) (GatewayClient, error)
type GatewayList ¶
type GatewayList []*Gateway
func (GatewayList) AsInputResources ¶
func (list GatewayList) AsInputResources() resources.InputResourceList
func (GatewayList) AsInterfaces ¶
func (list GatewayList) AsInterfaces() []interface{}
func (GatewayList) AsResources ¶
func (list GatewayList) AsResources() resources.ResourceList
func (GatewayList) Clone ¶
func (list GatewayList) Clone() GatewayList
func (GatewayList) Each ¶
func (list GatewayList) Each(f func(element *Gateway))
func (GatewayList) EachResource ¶
func (list GatewayList) EachResource(f func(element resources.Resource))
func (GatewayList) Find ¶
func (list GatewayList) Find(namespace, name string) (*Gateway, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (GatewayList) Names ¶
func (list GatewayList) Names() []string
func (GatewayList) NamespacesDotNames ¶
func (list GatewayList) NamespacesDotNames() []string
func (GatewayList) Sort ¶
func (list GatewayList) Sort() GatewayList
type GatewayReconciler ¶
type GatewayReconciler interface {
Reconcile(namespace string, desiredResources GatewayList, transition TransitionGatewayFunc, opts clients.ListOpts) error
}
func NewGatewayReconciler ¶
func NewGatewayReconciler(client GatewayClient) GatewayReconciler
type GatewayWatcher ¶
type Gateway_HttpGateway ¶
type Gateway_HttpGateway struct {
HttpGateway *HttpGateway `protobuf:"bytes,9,opt,name=http_gateway,json=httpGateway,proto3,oneof"`
}
func (*Gateway_HttpGateway) Equal ¶
func (this *Gateway_HttpGateway) Equal(that interface{}) bool
type Gateway_TcpGateway ¶
type Gateway_TcpGateway struct {
TcpGateway *TcpGateway `protobuf:"bytes,10,opt,name=tcp_gateway,json=tcpGateway,proto3,oneof"`
}
func (*Gateway_TcpGateway) Equal ¶
func (this *Gateway_TcpGateway) Equal(that interface{}) bool
type HttpGateway ¶
type HttpGateway struct { // names of the the virtual services, which contain the actual routes for the gateway // if the list is empty, all virtual services will apply to this gateway (with accordance to tls flag above). VirtualServices []core.ResourceRef `protobuf:"bytes,1,rep,name=virtual_services,json=virtualServices,proto3" json:"virtual_services"` // http gateway configuration Plugins *v1.HttpListenerPlugins `protobuf:"bytes,8,opt,name=plugins,proto3" json:"plugins,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HttpGateway) Descriptor ¶
func (*HttpGateway) Descriptor() ([]byte, []int)
func (*HttpGateway) Equal ¶
func (this *HttpGateway) Equal(that interface{}) bool
func (*HttpGateway) GetPlugins ¶
func (m *HttpGateway) GetPlugins() *v1.HttpListenerPlugins
func (*HttpGateway) GetVirtualServices ¶
func (m *HttpGateway) GetVirtualServices() []core.ResourceRef
func (*HttpGateway) ProtoMessage ¶
func (*HttpGateway) ProtoMessage()
func (*HttpGateway) Reset ¶
func (m *HttpGateway) Reset()
func (*HttpGateway) String ¶
func (m *HttpGateway) String() string
func (*HttpGateway) XXX_DiscardUnknown ¶
func (m *HttpGateway) XXX_DiscardUnknown()
func (*HttpGateway) XXX_Marshal ¶
func (m *HttpGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HttpGateway) XXX_Merge ¶
func (m *HttpGateway) XXX_Merge(src proto.Message)
func (*HttpGateway) XXX_Size ¶
func (m *HttpGateway) XXX_Size() int
func (*HttpGateway) XXX_Unmarshal ¶
func (m *HttpGateway) XXX_Unmarshal(b []byte) error
type TcpGateway ¶
type TcpGateway struct { // Name of the destinations the gateway can route to Destinations []*v1.TcpHost `protobuf:"bytes,1,rep,name=destinations,proto3" json:"destinations,omitempty"` // tcp gateway configuration Plugins *v1.TcpListenerPlugins `protobuf:"bytes,8,opt,name=plugins,proto3" json:"plugins,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TcpGateway) Descriptor ¶
func (*TcpGateway) Descriptor() ([]byte, []int)
func (*TcpGateway) Equal ¶
func (this *TcpGateway) Equal(that interface{}) bool
func (*TcpGateway) GetDestinations ¶
func (m *TcpGateway) GetDestinations() []*v1.TcpHost
func (*TcpGateway) GetPlugins ¶
func (m *TcpGateway) GetPlugins() *v1.TcpListenerPlugins
func (*TcpGateway) ProtoMessage ¶
func (*TcpGateway) ProtoMessage()
func (*TcpGateway) Reset ¶
func (m *TcpGateway) Reset()
func (*TcpGateway) String ¶
func (m *TcpGateway) String() string
func (*TcpGateway) XXX_DiscardUnknown ¶
func (m *TcpGateway) XXX_DiscardUnknown()
func (*TcpGateway) XXX_Marshal ¶
func (m *TcpGateway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TcpGateway) XXX_Merge ¶
func (m *TcpGateway) XXX_Merge(src proto.Message)
func (*TcpGateway) XXX_Size ¶
func (m *TcpGateway) XXX_Size() int
func (*TcpGateway) XXX_Unmarshal ¶
func (m *TcpGateway) XXX_Unmarshal(b []byte) error
type TransitionGatewayFunc ¶
Option to copy anything from the original to the desired before writing. Return value of false means don't update
Click to show internal directories.
Click to hide internal directories.