MCPcopy Index your code
hub / github.com/github/gh-ost / ReattachedKey

Method ReattachedKey

go/mysql/instance_key.go:114–119  ·  view source on GitHub ↗

ReattachedKey returns an instance key whose hostname is detached: invalid, but recoverable

()

Source from the content-addressed store, hash-verified

112
113// ReattachedKey returns an instance key whose hostname is detached: invalid, but recoverable
114func (ik *InstanceKey) ReattachedKey() *InstanceKey {
115 if !ik.IsDetached() {
116 return ik
117 }
118 return &InstanceKey{Hostname: ik.Hostname[len(detachHint):], Port: ik.Port}
119}
120
121// StringCode returns an official string representation of this key
122func (ik *InstanceKey) StringCode() string {

Callers

nothing calls this directly

Calls 1

IsDetachedMethod · 0.95

Tested by

no test coverage detected