Documentation ¶
Overview ¶
* [2013] - [2018] Avi Networks Incorporated * All Rights Reserved. * 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
- Variables
- func GetAllDRs() map[string]map[string]string
- func GetAllGateways() map[string]map[string]string
- func GetAllVSes() map[string]map[string]string
- func ProcessDR(currStore map[string]map[string]*istio_objs.IstioObject, ...)
- func ProcessGateway(currStore map[string]map[string]*istio_objs.IstioObject, ...)
- func ProcessVS(currStore map[string]map[string]*istio_objs.IstioObject, ...)
- type ConfigDescriptor
- type Controller
- type MCPClient
- type ProtoSchema
Constants ¶
const (
// DefaultMCPMaxMsgSize is the default maximum message size
DefaultMCPMaxMsgSize = 1024 * 1024 * 4
)
Variables ¶
var ( // VirtualService describes v1alpha3 route rules VirtualService = ProtoSchema{ Type: "virtual-service", Plural: "virtual-services", Group: "networking", Version: "v1alpha3", MessageName: "istio.networking.v1alpha3.VirtualService", GetAll: GetAllVSes, Store: ProcessVS, Collection: "istio/networking/v1alpha3/virtualservices", } Gateway = ProtoSchema{ Type: "gateway", Plural: "gateways", Group: "networking", Version: "v1alpha3", MessageName: "istio.networking.v1alpha3.Gateway", Store: ProcessGateway, GetAll: GetAllGateways, Collection: "istio/networking/v1alpha3/gateways", } // ServiceEntry describes service entries ServiceEntry = ProtoSchema{ Type: "service-entry", Plural: "service-entries", Group: "networking", Version: "v1alpha3", MessageName: "istio.networking.v1alpha3.ServiceEntry", Store: ProcessVS, GetAll: GetAllVSes, Collection: "istio/networking/v1alpha3/serviceentries", } DestinationRule = ProtoSchema{ Type: "destination-rule", Plural: "destination-rules", Group: "networking", Version: "v1alpha3", MessageName: "istio.networking.v1alpha3.DestinationRule", Store: ProcessDR, GetAll: GetAllDRs, Collection: "istio/networking/v1alpha3/destinationrules", } // IstioConfigTypes lists all Istio config types with schemas and validation IstioConfigTypes = ConfigDescriptor{ VirtualService, Gateway, ServiceEntry, DestinationRule, } )
Functions ¶
func GetAllGateways ¶
func GetAllVSes ¶
func ProcessDR ¶
func ProcessDR(currStore map[string]map[string]*istio_objs.IstioObject, prevStore map[string]map[string]string)
func ProcessGateway ¶
func ProcessGateway(currStore map[string]map[string]*istio_objs.IstioObject, prevStore map[string]map[string]string)
func ProcessVS ¶
func ProcessVS(currStore map[string]map[string]*istio_objs.IstioObject, prevStore map[string]map[string]string)
Types ¶
type ConfigDescriptor ¶
type ConfigDescriptor []ProtoSchema
func (ConfigDescriptor) CalculateUpdates ¶
func (ConfigDescriptor) GetByType ¶
func (descriptor ConfigDescriptor) GetByType(name string) (ProtoSchema, bool)
GetByType finds a schema by type if it is available
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController() *Controller
func (*Controller) Apply ¶
func (c *Controller) Apply(change *sink.Change) error
Apply receives changes from MCP server and creates the corresponding config
func (*Controller) ConfigDescriptor ¶
func (c *Controller) ConfigDescriptor() ConfigDescriptor
ConfigDescriptor returns all the ConfigDescriptors that this controller is responsible for
func (*Controller) HasSynced ¶
func (c *Controller) HasSynced() bool
HasSynced is used to tell the MCP server that the first set of items that were supposed to be sent to this client for the registered types has been received.
type MCPClient ¶
type MCPClient struct { MCPServerAddrs []string // contains filtered or unexported fields }
func (*MCPClient) InitMCPClient ¶
type ProtoSchema ¶
type ProtoSchema struct { ClusterScoped bool Type string Plural string Group string Version string MessageName string CalculateUpdates func(map[string]map[string]string, map[string]map[string]string) GetAll func() map[string]map[string]string Store func(map[string]map[string]*istio_objs.IstioObject, map[string]map[string]string) Collection string }