configs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Copyright (c) 2021 The BFE Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2021 The BFE Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2021 The BFE Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (c) 2021 The BFE Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	ConfigNameclusterConf = "gslb_data_conf"

	GslbData         = "cluster_conf/gslb.data"
	ClusterTableData = "cluster_conf/cluster_table.data"
)
View Source
const (
	DefaultProduct       = "default"
	ConfigNameServerData = "server_data_conf"
)
View Source
const (
	DefaultCNName = "example"
)

Variables

View Source
var (
	ConfigNameTLSConf = "tls_conf"

	ServerCertData  = "tls_conf/server_cert_conf.data"
	TLSRuleData     = "tls_conf/tls_rule_conf.data"
	CertKeyFilePath = "tls_conf/certs/"

	SecretCrt = "tls.crt"
	SecretKey = "tls.key"
)
View Source
var (
	HostRuleData    = "server_data_conf/host_rule.data"
	RouteRuleData   = "server_data_conf/route_rule.data"
	ClusterConfData = "server_data_conf/cluster_conf.data"
)

Functions

func NewHttpRule

func NewHttpRule(ingress string, host string, path string, annots map[string]string, cluster string, time time.Time) *httpRule

Types

type ClusterConfig

type ClusterConfig struct {
	// contains filtered or unexported fields
}

func NewClusterConfig

func NewClusterConfig(version string) *ClusterConfig

func (*ClusterConfig) DeleteIngress

func (c *ClusterConfig) DeleteIngress(namespace, name string)

func (*ClusterConfig) DeleteService

func (c *ClusterConfig) DeleteService(namespace, name string)

func (*ClusterConfig) Reload

func (c *ClusterConfig) Reload() error

func (*ClusterConfig) UpdateIngress

func (c *ClusterConfig) UpdateIngress(ingress *netv1.Ingress, services map[string]*corev1.Service, endpoints map[string]*corev1.Endpoints) error

func (*ClusterConfig) UpdateService

func (c *ClusterConfig) UpdateService(service *corev1.Service, endpoint *corev1.Endpoints) error

type HttpRouteRuleCache

type HttpRouteRuleCache struct {
	// contains filtered or unexported fields
}

type RouteRuleCache

type RouteRuleCache struct {
	// contains filtered or unexported fields
}

func NewRouteRuleCache

func NewRouteRuleCache() *RouteRuleCache

func (*RouteRuleCache) ContainsIngress

func (c *RouteRuleCache) ContainsIngress(ingress string) bool

ContainsIngress returns true if ingress exist in cache

func (*RouteRuleCache) DeleteHttpRulesByIngress

func (c *RouteRuleCache) DeleteHttpRulesByIngress(ingress string)

func (*RouteRuleCache) GetHttpRules

func (c *RouteRuleCache) GetHttpRules() (basicRuleList []*httpRule, advancedRuleList []*httpRule)

func (*RouteRuleCache) PutHttpRule

func (c *RouteRuleCache) PutHttpRule(rule *httpRule) error

type ServerDataConfig

type ServerDataConfig struct {
	// contains filtered or unexported fields
}

func NewServerDataConfig

func NewServerDataConfig(version string) *ServerDataConfig

func (*ServerDataConfig) DeleteIngress

func (c *ServerDataConfig) DeleteIngress(namespace, name string)

func (*ServerDataConfig) Reload

func (c *ServerDataConfig) Reload() error

func (*ServerDataConfig) UpdateIngress

func (c *ServerDataConfig) UpdateIngress(ingress *netv1.Ingress) error

type TLSConfig

type TLSConfig struct {
	// contains filtered or unexported fields
}

func NewTLSConfig

func NewTLSConfig(version string) *TLSConfig

func (*TLSConfig) DeleteIngress

func (c *TLSConfig) DeleteIngress(namespace, name string)

func (*TLSConfig) DeleteSecret

func (c *TLSConfig) DeleteSecret(namespace, name string)

func (*TLSConfig) Reload

func (c *TLSConfig) Reload() error

func (*TLSConfig) UpdateIngress

func (c *TLSConfig) UpdateIngress(ingress *netv1.Ingress, secrets []*corev1.Secret) error

func (*TLSConfig) UpdateSecret

func (c *TLSConfig) UpdateSecret(secret *corev1.Secret) error

Jump to

Keyboard shortcuts

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