Documentation ¶
Index ¶
- Variables
- func NewApiEventLoop(emitter ApiEmitter, syncer ApiSyncer) eventloop.EventLoop
- type ApiEmitter
- type ApiSnapshot
- type ApiSnapshotStringer
- 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) 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) GetUseProxyProto() *types.BoolValue
- func (m *Gateway) GetVirtualServices() []core.ResourceRef
- 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 (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) Find(namespace, name string) (*Gateway, error)
- func (list GatewayList) Names() []string
- func (list GatewayList) NamespacesDotNames() []string
- func (list GatewayList) Sort() GatewayList
- type GatewayReconciler
- type GatewaysByNamespace
- type TransitionGatewayFunc
- type TransitionVirtualServiceFunc
- type VirtualService
- func (o *VirtualService) DeepCopyObject() runtime.Object
- func (*VirtualService) Descriptor() ([]byte, []int)
- func (this *VirtualService) Equal(that interface{}) bool
- func (m *VirtualService) GetDisplayName() string
- func (m *VirtualService) GetMetadata() core.Metadata
- func (o *VirtualService) GetObjectKind() schema.ObjectKind
- func (m *VirtualService) GetSslConfig() *v1.SslConfig
- func (m *VirtualService) GetStatus() core.Status
- func (m *VirtualService) GetVirtualHost() *v1.VirtualHost
- func (r *VirtualService) Hash() uint64
- func (*VirtualService) ProtoMessage()
- func (m *VirtualService) Reset()
- func (r *VirtualService) SetMetadata(meta core.Metadata)
- func (r *VirtualService) SetStatus(status core.Status)
- func (m *VirtualService) String() string
- func (m *VirtualService) XXX_DiscardUnknown()
- func (m *VirtualService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VirtualService) XXX_Merge(src proto.Message)
- func (m *VirtualService) XXX_Size() int
- func (m *VirtualService) XXX_Unmarshal(b []byte) error
- type VirtualServiceClient
- func NewVirtualServiceClient(rcFactory factory.ResourceClientFactory) (VirtualServiceClient, error)
- func NewVirtualServiceClientWithBase(rc clients.ResourceClient) VirtualServiceClient
- func NewVirtualServiceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (VirtualServiceClient, error)
- type VirtualServiceList
- func (list VirtualServiceList) AsInputResources() resources.InputResourceList
- func (list VirtualServiceList) AsInterfaces() []interface{}
- func (list VirtualServiceList) AsResources() resources.ResourceList
- func (list VirtualServiceList) Clone() VirtualServiceList
- func (list VirtualServiceList) Each(f func(element *VirtualService))
- func (list VirtualServiceList) Find(namespace, name string) (*VirtualService, error)
- func (list VirtualServiceList) Names() []string
- func (list VirtualServiceList) NamespacesDotNames() []string
- func (list VirtualServiceList) Sort() VirtualServiceList
- type VirtualServiceReconciler
- type VirtualServicesByNamespace
- func (byNamespace VirtualServicesByNamespace) Add(virtualService ...*VirtualService)
- func (byNamespace VirtualServicesByNamespace) Clear(namespace string)
- func (byNamespace VirtualServicesByNamespace) Clone() VirtualServicesByNamespace
- func (byNamespace VirtualServicesByNamespace) List() VirtualServiceList
Constants ¶
This section is empty.
Variables ¶
var GatewayCrd = crd.NewCrd("gateway.solo.io", "gateways", "gateway.solo.io", "v1", "Gateway", "gw", false, &Gateway{})
var VirtualServiceCrd = crd.NewCrd("gateway.solo.io", "virtualservices", "gateway.solo.io", "v1", "VirtualService", "vs", false, &VirtualService{})
Functions ¶
func NewApiEventLoop ¶
func NewApiEventLoop(emitter ApiEmitter, syncer ApiSyncer) eventloop.EventLoop
Types ¶
type ApiEmitter ¶
type ApiEmitter interface { Register() error Gateway() GatewayClient VirtualService() VirtualServiceClient Snapshots(watchNamespaces []string, opts clients.WatchOpts) (<-chan *ApiSnapshot, <-chan error, error) }
func NewApiEmitter ¶
func NewApiEmitter(gatewayClient GatewayClient, virtualServiceClient VirtualServiceClient) ApiEmitter
func NewApiEmitterWithEmit ¶
func NewApiEmitterWithEmit(gatewayClient GatewayClient, virtualServiceClient VirtualServiceClient, emit <-chan struct{}) ApiEmitter
type ApiSnapshot ¶
type ApiSnapshot struct { Gateways GatewaysByNamespace VirtualServices VirtualServicesByNamespace }
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 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"` // 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,2,rep,name=virtual_services,json=virtualServices,proto3" json:"virtual_services"` // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
@solo-kit:resource.short_name=gw @solo-kit:resource.plural_name=gateways @solo-kit:resource.resource_groups=api.gateway.solo.io
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) GetMetadata ¶
func (*Gateway) GetObjectKind ¶
func (o *Gateway) GetObjectKind() schema.ObjectKind
func (*Gateway) GetPlugins ¶
func (m *Gateway) GetPlugins() *v1.ListenerPlugins
func (*Gateway) GetUseProxyProto ¶ added in v0.13.15
func (*Gateway) GetVirtualServices ¶
func (m *Gateway) GetVirtualServices() []core.ResourceRef
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_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) Watch(namespace string, opts clients.WatchOpts) (<-chan GatewayList, <-chan error, error) }
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) 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 GatewaysByNamespace ¶
type GatewaysByNamespace map[string]GatewayList
func (GatewaysByNamespace) Add ¶
func (byNamespace GatewaysByNamespace) Add(gateway ...*Gateway)
func (GatewaysByNamespace) Clear ¶
func (byNamespace GatewaysByNamespace) Clear(namespace string)
func (GatewaysByNamespace) Clone ¶
func (byNamespace GatewaysByNamespace) Clone() GatewaysByNamespace
func (GatewaysByNamespace) List ¶
func (byNamespace GatewaysByNamespace) List() GatewayList
type TransitionGatewayFunc ¶
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type TransitionVirtualServiceFunc ¶
type TransitionVirtualServiceFunc func(original, desired *VirtualService) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
type VirtualService ¶
type VirtualService struct { VirtualHost *v1.VirtualHost `protobuf:"bytes,1,opt,name=virtual_host,json=virtualHost,proto3" json:"virtual_host,omitempty"` // If provided, the Gateway will serve TLS/SSL traffic for this set of routes SslConfig *v1.SslConfig `protobuf:"bytes,2,opt,name=ssl_config,json=sslConfig,proto3" json:"ssl_config,omitempty"` // Display only, optional descriptive name. // Unlike metadata.name, DisplayName can be changed without deleting the resource. DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
@solo-kit:resource.short_name=vs @solo-kit:resource.plural_name=virtual_services @solo-kit:resource.resource_groups=api.gateway.solo.io A virtual service describes the set of routes to match for a set of domains. Domains must be unique across all virtual services within a gateway (i.e. no overlap between sets).
func NewVirtualService ¶
func NewVirtualService(namespace, name string) *VirtualService
func (*VirtualService) DeepCopyObject ¶
func (o *VirtualService) DeepCopyObject() runtime.Object
func (*VirtualService) Descriptor ¶
func (*VirtualService) Descriptor() ([]byte, []int)
func (*VirtualService) Equal ¶
func (this *VirtualService) Equal(that interface{}) bool
func (*VirtualService) GetDisplayName ¶
func (m *VirtualService) GetDisplayName() string
func (*VirtualService) GetMetadata ¶
func (m *VirtualService) GetMetadata() core.Metadata
func (*VirtualService) GetObjectKind ¶
func (o *VirtualService) GetObjectKind() schema.ObjectKind
func (*VirtualService) GetSslConfig ¶
func (m *VirtualService) GetSslConfig() *v1.SslConfig
func (*VirtualService) GetStatus ¶
func (m *VirtualService) GetStatus() core.Status
func (*VirtualService) GetVirtualHost ¶
func (m *VirtualService) GetVirtualHost() *v1.VirtualHost
func (*VirtualService) Hash ¶
func (r *VirtualService) Hash() uint64
func (*VirtualService) ProtoMessage ¶
func (*VirtualService) ProtoMessage()
func (*VirtualService) Reset ¶
func (m *VirtualService) Reset()
func (*VirtualService) SetMetadata ¶
func (r *VirtualService) SetMetadata(meta core.Metadata)
func (*VirtualService) SetStatus ¶
func (r *VirtualService) SetStatus(status core.Status)
func (*VirtualService) String ¶
func (m *VirtualService) String() string
func (*VirtualService) XXX_DiscardUnknown ¶
func (m *VirtualService) XXX_DiscardUnknown()
func (*VirtualService) XXX_Marshal ¶
func (m *VirtualService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VirtualService) XXX_Merge ¶
func (m *VirtualService) XXX_Merge(src proto.Message)
func (*VirtualService) XXX_Size ¶
func (m *VirtualService) XXX_Size() int
func (*VirtualService) XXX_Unmarshal ¶
func (m *VirtualService) XXX_Unmarshal(b []byte) error
type VirtualServiceClient ¶
type VirtualServiceClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*VirtualService, error) Write(resource *VirtualService, opts clients.WriteOpts) (*VirtualService, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (VirtualServiceList, error) Watch(namespace string, opts clients.WatchOpts) (<-chan VirtualServiceList, <-chan error, error) }
func NewVirtualServiceClient ¶
func NewVirtualServiceClient(rcFactory factory.ResourceClientFactory) (VirtualServiceClient, error)
func NewVirtualServiceClientWithBase ¶
func NewVirtualServiceClientWithBase(rc clients.ResourceClient) VirtualServiceClient
func NewVirtualServiceClientWithToken ¶
func NewVirtualServiceClientWithToken(rcFactory factory.ResourceClientFactory, token string) (VirtualServiceClient, error)
type VirtualServiceList ¶
type VirtualServiceList []*VirtualService
func (VirtualServiceList) AsInputResources ¶
func (list VirtualServiceList) AsInputResources() resources.InputResourceList
func (VirtualServiceList) AsInterfaces ¶
func (list VirtualServiceList) AsInterfaces() []interface{}
func (VirtualServiceList) AsResources ¶
func (list VirtualServiceList) AsResources() resources.ResourceList
func (VirtualServiceList) Clone ¶
func (list VirtualServiceList) Clone() VirtualServiceList
func (VirtualServiceList) Each ¶
func (list VirtualServiceList) Each(f func(element *VirtualService))
func (VirtualServiceList) Find ¶
func (list VirtualServiceList) Find(namespace, name string) (*VirtualService, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (VirtualServiceList) Names ¶
func (list VirtualServiceList) Names() []string
func (VirtualServiceList) NamespacesDotNames ¶
func (list VirtualServiceList) NamespacesDotNames() []string
func (VirtualServiceList) Sort ¶
func (list VirtualServiceList) Sort() VirtualServiceList
type VirtualServiceReconciler ¶
type VirtualServiceReconciler interface {
Reconcile(namespace string, desiredResources VirtualServiceList, transition TransitionVirtualServiceFunc, opts clients.ListOpts) error
}
func NewVirtualServiceReconciler ¶
func NewVirtualServiceReconciler(client VirtualServiceClient) VirtualServiceReconciler
type VirtualServicesByNamespace ¶
type VirtualServicesByNamespace map[string]VirtualServiceList
func (VirtualServicesByNamespace) Add ¶
func (byNamespace VirtualServicesByNamespace) Add(virtualService ...*VirtualService)
func (VirtualServicesByNamespace) Clear ¶
func (byNamespace VirtualServicesByNamespace) Clear(namespace string)
func (VirtualServicesByNamespace) Clone ¶
func (byNamespace VirtualServicesByNamespace) Clone() VirtualServicesByNamespace
func (VirtualServicesByNamespace) List ¶
func (byNamespace VirtualServicesByNamespace) List() VirtualServiceList