diff --git a/api/types/appserver.go b/api/types/appserver.go index 822dfb8d31f..32648b1ee6e 100644 --- a/api/types/appserver.go +++ b/api/types/appserver.go @@ -44,6 +44,8 @@ type AppServer interface { GetHostname() string // GetHostID returns ID of the host the server is running on. GetHostID() string + // SetHostID sets ID of the host the server is running on. + SetHostID(string) // GetRotation gets the state of certificate authority rotation. GetRotation() Rotation // SetRotation sets the state of certificate authority rotation. @@ -149,6 +151,11 @@ func (s *AppServerV3) GetHostID() string { return s.Spec.HostID } +// SetHostID sets ID of the host the server is running on. +func (s *AppServerV3) SetHostID(hostID string) { + s.Spec.HostID = hostID +} + // GetKind returns the resource kind. func (s *AppServerV3) GetKind() string { return s.Kind