Documentation ¶
Index ¶
- func InitDefaultGRM() error
- func UpsertCaFunc(existing, desired *v1.CaCertificate) error
- func UpsertCertFunc(existing, desired *v1.Certificate) error
- func UpsertFilterFunc(existing, desired *v1.Filter) error
- func UpsertGatewayFunc(existing, desired *v1.Gateway) error
- func UpsertUpstreamFunc(existing, desired *v1.Upstream) error
- type CaManager
- func (c *CaManager) Create(ctx context.Context, obj *v1.CaCertificate) error
- func (c *CaManager) Delete(ctx context.Context, name string) error
- func (c *CaManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.CaCertificate, error)
- func (c *CaManager) Get(ctx context.Context, name string) (*v1.CaCertificate, error)
- func (c *CaManager) Init() error
- func (c *CaManager) Update(ctx context.Context, obj *v1.CaCertificate) error
- type CertManager
- func (c *CertManager) Create(ctx context.Context, obj *v1.Certificate) error
- func (c *CertManager) Delete(ctx context.Context, name string) error
- func (c *CertManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Certificate, error)
- func (c *CertManager) Get(ctx context.Context, name string) (*v1.Certificate, error)
- func (c *CertManager) Init() error
- func (c *CertManager) Update(ctx context.Context, obj *v1.Certificate) error
- type FilterManager
- func (f *FilterManager) Create(ctx context.Context, obj *v1.Filter) error
- func (f *FilterManager) Delete(ctx context.Context, name string) error
- func (f *FilterManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Filter, error)
- func (f *FilterManager) Get(ctx context.Context, name string) (*v1.Filter, error)
- func (f *FilterManager) Init() error
- func (f *FilterManager) Update(ctx context.Context, obj *v1.Filter) error
- type FilterOptions
- type GRM
- type GatewayManager
- func (c *GatewayManager) Create(ctx context.Context, obj *v1.Gateway) error
- func (c *GatewayManager) Delete(ctx context.Context, name string) error
- func (c *GatewayManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Gateway, error)
- func (c *GatewayManager) Get(ctx context.Context, name string) (*v1.Gateway, error)
- func (c *GatewayManager) Init() error
- func (c *GatewayManager) Update(ctx context.Context, obj *v1.Gateway) error
- type UpstreamManager
- func (u *UpstreamManager) Create(ctx context.Context, obj *v1.Upstream) error
- func (u *UpstreamManager) Delete(ctx context.Context, name string) error
- func (u *UpstreamManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Upstream, error)
- func (u *UpstreamManager) Get(ctx context.Context, name string) (*v1.Upstream, error)
- func (u *UpstreamManager) Init() error
- func (u *UpstreamManager) Update(ctx context.Context, obj *v1.Upstream) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDefaultGRM ¶
func InitDefaultGRM() error
func UpsertCaFunc ¶
func UpsertCaFunc(existing, desired *v1.CaCertificate) error
UpsertCaFunc todo 这里要验证一下, 这个接口是什么意思 CaCertificateTransitionFunction 这个函数应该是考虑复杂场景的 obj 更新, 就是并非一定是完全替换, 就像 git merge 一样, 可能是有规则的 merge, 就要实现这个函数
func UpsertCertFunc ¶
func UpsertCertFunc(existing, desired *v1.Certificate) error
func UpsertFilterFunc ¶
func UpsertGatewayFunc ¶
func UpsertUpstreamFunc ¶
UpsertUpstreamFunc 这个函数应该是考虑复杂场景的 obj 更新, 就是并非一定是完全替换, 就像 git merge 一样, 可能是有规则的 merge, 就要实现这个函数
Types ¶
type CaManager ¶
type CaManager struct {
CaClient v1.CaCertificateClient
}
func (*CaManager) Filter ¶
func (c *CaManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.CaCertificate, error)
type CertManager ¶
type CertManager struct {
CertClient v1.CertificateClient
}
func (*CertManager) Create ¶
func (c *CertManager) Create(ctx context.Context, obj *v1.Certificate) error
func (*CertManager) Filter ¶
func (c *CertManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Certificate, error)
func (*CertManager) Get ¶
func (c *CertManager) Get(ctx context.Context, name string) (*v1.Certificate, error)
func (*CertManager) Init ¶
func (c *CertManager) Init() error
func (*CertManager) Update ¶
func (c *CertManager) Update(ctx context.Context, obj *v1.Certificate) error
Update obj 表示更新后的对象, 之前的对象可以通过 key 自己找出来的
type FilterManager ¶
type FilterManager struct {
FilterClient v1.FilterClient
}
func (*FilterManager) Delete ¶
func (f *FilterManager) Delete(ctx context.Context, name string) error
func (*FilterManager) Filter ¶
func (f *FilterManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Filter, error)
func (*FilterManager) Init ¶
func (f *FilterManager) Init() error
type FilterOptions ¶
type FilterOptions struct { }
type GRM ¶
type GRM struct { CaManager CaManager `json:"ca_manager"` CertManager CertManager `json:"cert_manager"` UpstreamManager UpstreamManager `json:"upstream_manager"` FilterManager FilterManager `json:"filter_manager"` GatewayManager GatewayManager `json:"gateway_manager"` }
GRM (gate resource manager) 负责 gate resource 的管理 里面至少要保存 具体类型的 对象管理器, 每个管理器中包括相应的 对象客户端 , (why? 因为 kubernetes 可能提供不了我们想要的复杂查询时, 就需要 在 管理器这一层提供复杂查询接口)
func (*GRM) GetSnapshot ¶
type GatewayManager ¶
type GatewayManager struct {
GatewayClient v1.GatewayClient
}
func (*GatewayManager) Delete ¶
func (c *GatewayManager) Delete(ctx context.Context, name string) error
func (*GatewayManager) Filter ¶
func (c *GatewayManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Gateway, error)
func (*GatewayManager) Init ¶
func (c *GatewayManager) Init() error
type UpstreamManager ¶
type UpstreamManager struct {
UpstreamClient v1.UpstreamClient
}
func (*UpstreamManager) Delete ¶
func (u *UpstreamManager) Delete(ctx context.Context, name string) error
func (*UpstreamManager) Filter ¶
func (u *UpstreamManager) Filter(ctx context.Context, fo FilterOptions) ([]v1.Upstream, error)
func (*UpstreamManager) Init ¶
func (u *UpstreamManager) Init() error
Click to show internal directories.
Click to hide internal directories.