@@ -18,6 +18,8 @@ package launcherpopulator
1818
1919import (
2020 "fmt"
21+
22+ fmav1alpha1 "github.com/llm-d-incubation/llm-d-fast-model-actuation/api/fma/v1alpha1"
2123)
2224
2325// NodeLauncherKey defines the unique identifier for a (Node, LauncherConfig) pair
@@ -30,8 +32,22 @@ func (k NodeLauncherKey) String() string {
3032 return fmt .Sprintf ("%s/%s" , k .LauncherConfigName , k .NodeName )
3133}
3234
33- // MapToLoggable converts a map of NodeLauncherKey to int32 values into a string representation.
34- // This function formats the map as a string with the format "{namespace/name/node:count, ...}"
35+ // DesiredStateEntry holds the desired count and corresponding LauncherConfig
36+ // for a (Node, LauncherConfig) pair.
37+ type DesiredStateEntry struct {
38+ Count int32
39+ LauncherConfig * fmav1alpha1.LauncherConfig
40+ }
41+
42+ func (e DesiredStateEntry ) String () string {
43+ if e .LauncherConfig != nil {
44+ return fmt .Sprintf ("count=%d,config=%s" , e .Count , e .LauncherConfig .Name )
45+ }
46+ return fmt .Sprintf ("count=%d" , e .Count )
47+ }
48+
49+ // MapToLoggable converts a map of NodeLauncherKey to Val values into a string representation.
50+ // This function formats the map as a string with the format "{namespace/name/node:val, ...}"
3551// for debugging and logging purposes.
3652func MapToLoggable [Key interface {
3753 comparable
0 commit comments