Documentation ¶
Index ¶
- func NewAvailableCluster() cluster.Cluster
- func NewAvailableClusterInvoker(directory cluster.Directory) protocol.Invoker
- func NewBroadcastCluster() cluster.Cluster
- func NewFailFastCluster() cluster.Cluster
- func NewFailbackCluster() cluster.Cluster
- func NewFailoverCluster() cluster.Cluster
- func NewFailsafeCluster() cluster.Cluster
- func NewForkingCluster() cluster.Cluster
- func NewMockCluster() cluster.Cluster
- func NewZoneAwareCluster() cluster.Cluster
- type InterceptorInvoker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAvailableCluster ¶
NewAvailableCluster returns a cluster instance
Obtain available service providers
func NewAvailableClusterInvoker ¶
NewAvailableClusterInvoker returns a cluster invoker instance
func NewBroadcastCluster ¶
NewBroadcastCluster returns a broadcast cluster instance.
Calling all providers' broadcast one by one. All errors will be reported. It is usually used to notify all providers to update local resource information such as caches or logs.
func NewFailFastCluster ¶
NewFailFastCluster returns a failfast cluster instance.
Fast failure, only made a call, failure immediately error. Usually used for non-idempotent write operations, such as adding records.
func NewFailbackCluster ¶
NewFailbackCluster returns a failback cluster instance
Failure automatically restored, failed to record the background request, regular retransmission. Usually used for message notification operations.
func NewFailoverCluster ¶
NewFailoverCluster returns a failover cluster instance
Failure automatically switch, when there is a failure, retry the other server (default). Usually used for read operations, but retries can result in longer delays.
func NewFailsafeCluster ¶
NewFailsafeCluster returns a failsafe cluster instance.
Failure of security, anomalies, directly ignored. Usually it is used to write audit logs and other operations.
func NewForkingCluster ¶
NewForkingCluster returns a forking cluster instance.
Multiple servers are invoked in parallel, returning as soon as one succeeds. Usually it is used for real-time demanding read operations while wasting more service resources.
func NewMockCluster ¶
NewMockCluster returns a mock cluster instance.
Mock cluster is usually used for service degradation, such as an authentication service. When the service provider is completely hung up, the client does not throw an exception, return an authorization failure through the Mock data instead.
func NewZoneAwareCluster ¶
NewZoneAwareCluster returns a zoneaware cluster instance.
More than one registry for subscription. Usually it is used for choose between registries.
Types ¶
type InterceptorInvoker ¶
type InterceptorInvoker struct {
// contains filtered or unexported fields
}
InterceptorInvoker mocks cluster interceptor as an invoker
func (*InterceptorInvoker) Destroy ¶
func (i *InterceptorInvoker) Destroy()
Destroy will destroy invoker
func (*InterceptorInvoker) GetURL ¶
func (i *InterceptorInvoker) GetURL() *common.URL
GetURL is used to get url from InterceptorInvoker
func (*InterceptorInvoker) Invoke ¶
func (i *InterceptorInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result
Invoke is used to call service method by invocation
func (*InterceptorInvoker) IsAvailable ¶
func (i *InterceptorInvoker) IsAvailable() bool
IsAvailable is used to get available status
Source Files ¶
- available_cluster.go
- available_cluster_invoker.go
- base_cluster_invoker.go
- broadcast_cluster.go
- broadcast_cluster_invoker.go
- failback_cluster.go
- failback_cluster_invoker.go
- failfast_cluster.go
- failfast_cluster_invoker.go
- failover_cluster.go
- failover_cluster_invoker.go
- failsafe_cluster.go
- failsafe_cluster_invoker.go
- forking_cluster.go
- forking_cluster_invoker.go
- interceptor_invoker.go
- mock_cluster.go
- zone_aware_cluster.go
- zone_aware_cluster_interceptor.go
- zone_aware_cluster_invoker.go