Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang committed Nov 8, 2024
1 parent 51d33d0 commit b0a6106
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
18 changes: 9 additions & 9 deletions client/caller/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@
package caller

type (
// ID represents the caller ID.
// Caller ID can be understood as a binary file; it is a process.
ID string
// Component represents the caller component.
// Caller component refers to the components within the process.
Component string
)

// nolint:exported
const (
Unknown ID = "unknown"
Tidb ID = "tidb"
Pd ID = "pd"
Tikv ID = "tikv"
TiDB ID = "tidb"
PD ID = "pd"
TiKV ID = "tikv"
TiFlash ID = "tiflash"
Lightning ID = "lightning"
Dumpling ID = "dumpling"
Br ID = "br"
Dm ID = "dm"
Cdc ID = "cdc"
BR ID = "br"
DM ID = "dm"
CDC ID = "cdc"
Operator ID = "operator"
Dashboard ID = "dashboard"

// If the component you used is not in the list, please add it here.
Ddl Component = "ddl"
DDL Component = "ddl"

// TestID is used for test.
TestID ID = "test"
Expand Down
6 changes: 5 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ type RPCClient interface {
SetExternalTimestamp(ctx context.Context, timestamp uint64) error

// WithCallerID returns a new RPCClient with the specified caller ID.
// Caller ID can be understood as a binary file; it is a process.
WithCallerID(callerID caller.ID) RPCClient
// WithCallerComponent returns a new RPCClient with the specified caller component.
// Caller component refers to the components within the process.
WithCallerComponent(callerComponent caller.Component) RPCClient

// TSOClient is the TSO client.
Expand Down Expand Up @@ -217,7 +219,9 @@ func (k *serviceModeKeeper) close() {
}

type client struct {
callerID caller.ID
// Caller ID can be understood as a binary file; it is a process.
callerID caller.ID
// Caller component refers to the components within the process.
callerComponent caller.Component

inner *innerClient
Expand Down

0 comments on commit b0a6106

Please sign in to comment.