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

Method DetachedKey

go/mysql/instance_key.go:106–111  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

104
105// DetachedKey returns an instance key whose hostname is detached: invalid, but recoverable
106func (ik *InstanceKey) DetachedKey() *InstanceKey {
107 if ik.IsDetached() {
108 return ik
109 }
110 return &InstanceKey{Hostname: fmt.Sprintf("%s%s", detachHint, ik.Hostname), Port: ik.Port}
111}
112
113// ReattachedKey returns an instance key whose hostname is detached: invalid, but recoverable
114func (ik *InstanceKey) ReattachedKey() *InstanceKey {

Callers

nothing calls this directly

Calls 1

IsDetachedMethod · 0.95

Tested by

no test coverage detected