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.
* 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 ¶
- func PublishInstanceEvent(evt discovery.KvEvent, domainProject string, serviceKey *pb.MicroServiceKey, ...)
- type DependencyEventHandler
- type DependencyEventHandlerResource
- type DependencyRuleEventHandler
- type DomainEventHandler
- type InstanceEventHandler
- type RuleEventHandler
- type RulesChangedTask
- type SchemaSummaryEventHandler
- type ServiceEventHandler
- type TagEventHandler
- type TagsChangedTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishInstanceEvent ¶
Types ¶
type DependencyEventHandler ¶
type DependencyEventHandler struct {
// contains filtered or unexported fields
}
DependencyEventHandler add or remove the service dependencies when user call find instance api or dependence operation api
func NewDependencyEventHandler ¶
func NewDependencyEventHandler() *DependencyEventHandler
func (*DependencyEventHandler) CleanUp ¶
func (h *DependencyEventHandler) CleanUp(domainProjects map[string]struct{})
func (*DependencyEventHandler) Handle ¶
func (h *DependencyEventHandler) Handle() error
func (*DependencyEventHandler) OnEvent ¶
func (h *DependencyEventHandler) OnEvent(evt discovery.KvEvent)
func (*DependencyEventHandler) Type ¶
func (h *DependencyEventHandler) Type() discovery.Type
type DependencyEventHandlerResource ¶
type DependencyEventHandlerResource struct {
// contains filtered or unexported fields
}
func NewDependencyEventHandlerResource ¶
func NewDependencyEventHandlerResource(dep *pb.ConsumerDependency, kv *discovery.KeyValue, domainProject string) *DependencyEventHandlerResource
type DependencyRuleEventHandler ¶
type DependencyRuleEventHandler struct { }
DependencyRuleEventHandler reset the find instances cache when provider dependency rule is changed
func NewDependencyRuleEventHandler ¶
func NewDependencyRuleEventHandler() *DependencyRuleEventHandler
func (*DependencyRuleEventHandler) OnEvent ¶
func (h *DependencyRuleEventHandler) OnEvent(evt discovery.KvEvent)
func (*DependencyRuleEventHandler) Type ¶
func (h *DependencyRuleEventHandler) Type() discovery.Type
type DomainEventHandler ¶
type DomainEventHandler struct { }
DomainEventHandler report domain & project total number
func NewDomainEventHandler ¶
func NewDomainEventHandler() *DomainEventHandler
func (*DomainEventHandler) OnEvent ¶
func (h *DomainEventHandler) OnEvent(evt discovery.KvEvent)
func (*DomainEventHandler) Type ¶
func (h *DomainEventHandler) Type() discovery.Type
type InstanceEventHandler ¶
type InstanceEventHandler struct { }
InstanceEventHandler is the handler to handle: 1. report instance metrics 2. recover the instance quota 3. publish the instance events to the subscribers 4. reset the find instance cache
func NewInstanceEventHandler ¶
func NewInstanceEventHandler() *InstanceEventHandler
func (*InstanceEventHandler) OnEvent ¶
func (h *InstanceEventHandler) OnEvent(evt discovery.KvEvent)
func (*InstanceEventHandler) Type ¶
func (h *InstanceEventHandler) Type() discovery.Type
type RuleEventHandler ¶
type RuleEventHandler struct { }
RuleEventHandler is the handler to handle: 1. publish the EVT_EXPIRE event to subscribers when rule is changed 2. reset the find instance cache
func NewRuleEventHandler ¶
func NewRuleEventHandler() *RuleEventHandler
func (*RuleEventHandler) OnEvent ¶
func (h *RuleEventHandler) OnEvent(evt discovery.KvEvent)
func (*RuleEventHandler) Type ¶
func (h *RuleEventHandler) Type() discovery.Type
type RulesChangedTask ¶
type RulesChangedTask struct { discovery.KvEvent DomainProject string ProviderID string // contains filtered or unexported fields }
func NewRulesChangedAsyncTask ¶
func NewRulesChangedAsyncTask(domainProject, providerID string, evt discovery.KvEvent) *RulesChangedTask
func (*RulesChangedTask) Err ¶
func (apt *RulesChangedTask) Err() error
func (*RulesChangedTask) Key ¶
func (apt *RulesChangedTask) Key() string
type SchemaSummaryEventHandler ¶
type SchemaSummaryEventHandler struct { }
SchemaSummaryEventHandler report schema metrics
func NewSchemaSummaryEventHandler ¶
func NewSchemaSummaryEventHandler() *SchemaSummaryEventHandler
func (*SchemaSummaryEventHandler) OnEvent ¶
func (h *SchemaSummaryEventHandler) OnEvent(evt discovery.KvEvent)
func (*SchemaSummaryEventHandler) Type ¶
func (h *SchemaSummaryEventHandler) Type() discovery.Type
type ServiceEventHandler ¶
type ServiceEventHandler struct { }
ServiceEventHandler is the handler to handle: 1. report service metrics 2. save the new domain & project mapping 3. reset the find instance cache
func NewServiceEventHandler ¶
func NewServiceEventHandler() *ServiceEventHandler
func (*ServiceEventHandler) OnEvent ¶
func (h *ServiceEventHandler) OnEvent(evt discovery.KvEvent)
func (*ServiceEventHandler) Type ¶
func (h *ServiceEventHandler) Type() discovery.Type
type TagEventHandler ¶
type TagEventHandler struct { }
TagEventHandler is the handler to handle: 1. publish the EVT_EXPIRE event to subscribers when tag is changed 2. reset the find instance cache
func NewTagEventHandler ¶
func NewTagEventHandler() *TagEventHandler
func (*TagEventHandler) OnEvent ¶
func (h *TagEventHandler) OnEvent(evt discovery.KvEvent)
func (*TagEventHandler) Type ¶
func (h *TagEventHandler) Type() discovery.Type
type TagsChangedTask ¶
type TagsChangedTask struct { discovery.KvEvent DomainProject string ConsumerID string // contains filtered or unexported fields }
func NewTagsChangedAsyncTask ¶
func NewTagsChangedAsyncTask(domainProject, consumerID string, evt discovery.KvEvent) *TagsChangedTask
func (*TagsChangedTask) Err ¶
func (apt *TagsChangedTask) Err() error
func (*TagsChangedTask) Key ¶
func (apt *TagsChangedTask) Key() string