-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ftr: add comment for cluster #584
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #584 +/- ##
===========================================
+ Coverage 66.43% 66.81% +0.37%
===========================================
Files 184 184
Lines 9712 9690 -22
===========================================
+ Hits 6452 6474 +22
+ Misses 2620 2576 -44
Partials 640 640
Continue to review full report at Codecov.
|
@@ -35,7 +35,7 @@ type availableClusterInvoker struct { | |||
baseClusterInvoker | |||
} | |||
|
|||
// NewAvailableClusterInvoker ... | |||
// NewAvailableClusterInvoker returns cluster invoker instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewAvailableClusterInvoker returns a cluster invoker instance
// NewBroadcastCluster ... | ||
// NewBroadcastCluster returns broadcast cluster instance | ||
// | ||
// Calling all providers broadcast, one by one call, any error is reported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NewBroadcastCluster returns a broadcast cluster instance.
//
// Calling all providers' broadcast one by one. All errors will be reported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the meaning of providers'
?
@@ -31,7 +31,10 @@ func init() { | |||
extension.SetCluster(failback, NewFailbackCluster) | |||
} | |||
|
|||
// NewFailbackCluster ... | |||
// NewFailbackCluster returns failback cluster instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewFailbackCluster returns a failback cluster instance.
cluster/loadbalance/round_robin.go
Outdated
@@ -52,7 +52,9 @@ func init() { | |||
|
|||
type roundRobinLoadBalance struct{} | |||
|
|||
// NewRoundRobinLoadBalance ... | |||
// NewRoundRobinLoadBalance returns round robin load balance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewFailFastCluster returns a failfast cluster instance
cluster/loadbalance/random.go
Outdated
// NewRandomLoadBalance ... | ||
// NewRandomLoadBalance returns random load balance instance | ||
// | ||
// Set random probabilities by weight, the request sent to provider is random |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NewRandomLoadBalance returns a random load balance instance.
//
// Set random probabilities by weight, and the request will be sent to provider randomly.
cluster/cluster_impl/mock_cluster.go
Outdated
// | ||
// 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, | ||
// but returns the authorization failure through the Mock data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
// NewForkingCluster returns forking cluster instance | ||
// | ||
// Multiple servers are invoked in parallel, returning as soon as one succeeds. | ||
// Usually used for real-time demanding read operations, but need to waste more service resources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NewForkingCluster returns a forking cluster instance.
//
// Multiple servers will be invoked in parallel at the same time, and return asap when
// getting response from the fastest server.
// Usually it is used for real-time demanding read operations while wasting more service resources.
// NewFailsafeCluster ... | ||
// NewFailsafeCluster returns failsafe cluster instance | ||
// | ||
// Failure of security, anomalies, directly ignored. Usually used to write audit logs and other operations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NewFailsafeCluster returns an failsafe cluster instance.
//
// Failure of security, anomalies, directly ignored. Usually it is
// used to write audit logs and other operations.
// | ||
// Failure automatically switch, when there is failure, | ||
// retry the other server (default). Usually used for read operations, | ||
// but retries can result in longer delays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
// NewFailFastCluster returns failfast cluster instance | ||
// | ||
// Fast failure, only made a call, failure immediately error. Usually used for non-idempotent write operations, | ||
// such as adding records. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
…rmelo/dubbo-go into featue/addCommentForCluster
What this PR does:
add comment for cluster directory
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: