github.com/TBD54566975/ftl@v0.219.0/internal/model/controller_key.go (about) 1 package model 2 3 import ( 4 "strconv" 5 ) 6 7 type ControllerKey = KeyType[ControllerPayload, *ControllerPayload] 8 9 func NewControllerKey(hostname, port string) ControllerKey { 10 return newKey[ControllerPayload](hostname, port) 11 } 12 13 func NewLocalControllerKey(suffix int) ControllerKey { 14 return newKey[ControllerPayload]("", strconv.Itoa(suffix)) 15 } 16 17 func ParseControllerKey(key string) (ControllerKey, error) { return parseKey[ControllerPayload](key) } 18 19 var _ KeyPayload = (*ControllerPayload)(nil) 20 21 type ControllerPayload struct { 22 HostPortMixin 23 } 24 25 func (c *ControllerPayload) Kind() string { return "ctr" }