Documentation
¶
Overview ¶
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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 SolverService(services []*v1.Service, rwg RouteWorkerGroup, wg *sync.WaitGroup, ...)
- func SolverSingleService(svc *v1.Service, rwg RouteWorkerGroup, wg *sync.WaitGroup, ...)
- func SolverSingleUpstream(u *v1.Upstream, swg ServiceWorkerGroup, wg *sync.WaitGroup, ...)
- func SolverUpstream(upstreams []*v1.Upstream, swg ServiceWorkerGroup, wg *sync.WaitGroup, ...)
- func SyncSsl(ssl *v1.Ssl, method string) error
- func WaitWorkerGroup(id string, resultChan chan CRDStatus) (string, error)
- func WatchUpstream()
- type ApisixCombination
- type CRDStatus
- type Event
- type Quit
- type ResourceStatus
- type RouteCompare
- type RouteWorkerGroup
- type ServiceQueueObj
- type ServiceWorkerGroup
- type UpstreamQueueObj
Constants ¶
const ( ApisixUpstream = "ApisixUpstream" WatchFromKind = "watch" )
const ( RouteKind = "route" ServiceKind = "service" UpstreamKind = "upstream" Create = "create" Update = "update" Delete = "delete" )
const ApisixService = "ApisixService"
Variables ¶
var UpstreamQueue chan UpstreamQueueObj
Functions ¶
func SolverService ¶
func SolverSingleService ¶
func SolverSingleUpstream ¶
func SolverUpstream ¶
func SolverUpstream(upstreams []*v1.Upstream, swg ServiceWorkerGroup, wg *sync.WaitGroup, errorChan chan CRDStatus)
upstream
func WatchUpstream ¶
func WatchUpstream()
Types ¶
type ApisixCombination ¶
type ApisixCombination struct {
Routes []*v1.Route
Services []*v1.Service
Upstreams []*v1.Upstream
}
func (*ApisixCombination) Remove ¶
func (s *ApisixCombination) Remove() error
func (*ApisixCombination) SyncWithGroup ¶
func (s *ApisixCombination) SyncWithGroup(ctx context.Context, id string, resultChan chan CRDStatus)
type ResourceStatus ¶
type RouteCompare ¶
type RouteWorkerGroup ¶
type RouteWorkerGroup map[string][]*routeWorker
RouteWorkerGroup for broadcast from service to route
func NewRouteWorkers ¶
func NewRouteWorkers(ctx context.Context, routes []*v1.Route, wg *sync.WaitGroup, errorChan chan CRDStatus) RouteWorkerGroup
NewRouteWorkers make routeWrokers group by service per CRD 1.make routes group by (1_2_3) it may be a map like map[1_2_3][]Route; 2.route is listenning Event from the ready of 1_2_3;
func (*RouteWorkerGroup) Add ¶
func (rg *RouteWorkerGroup) Add(key string, rw *routeWorker)
func (*RouteWorkerGroup) Delete ¶
func (rg *RouteWorkerGroup) Delete(key string, route *routeWorker)
type ServiceQueueObj ¶
type ServiceQueueObj struct {
Services []*v1.Service
RouteWorkerGroup RouteWorkerGroup
}
type ServiceWorkerGroup ¶
type ServiceWorkerGroup map[string][]*serviceWorker
ServiceWorkerGroup for broadcast from upstream to service
func NewServiceWorkers ¶
func NewServiceWorkers(ctx context.Context, services []*v1.Service, rwg *RouteWorkerGroup, wg *sync.WaitGroup, errorChan chan CRDStatus) ServiceWorkerGroup
service
func (*ServiceWorkerGroup) Add ¶
func (swg *ServiceWorkerGroup) Add(key string, s *serviceWorker)
func (*ServiceWorkerGroup) Delete ¶
func (swg *ServiceWorkerGroup) Delete(key string, s *serviceWorker)
type UpstreamQueueObj ¶
type UpstreamQueueObj struct {
Upstreams []*v1.Upstream
ServiceWorkerGroup ServiceWorkerGroup
Wg *sync.WaitGroup
ErrorChan chan CRDStatus
}
UpstreamQueueObj for upstream queue
func (*UpstreamQueueObj) AddQueue ¶
func (uqo *UpstreamQueueObj) AddQueue()
AddQueue make upstreams in order upstreams is group by CRD