MCPcopy
hub / github.com/kubernetes/kops / buildTaskKey

Function buildTaskKey

upup/pkg/fi/task.go:189–205  ·  view source on GitHub ↗
(task Task[T])

Source from the content-addressed store, hash-verified

187}
188
189func buildTaskKey[T SubContext](task Task[T]) string {
190 hasName, ok := task.(HasName)
191 if !ok {
192 klog.Fatalf("task %T does not implement HasName", task)
193 }
194
195 name := ValueOf(hasName.GetName())
196 if name == "" {
197 klog.Fatalf("task %T (%v) did not have a Name", task, task)
198 }
199
200 typeName := TypeNameForTask(task)
201
202 key := typeName + "/" + name
203
204 return key
205}
206
207func TypeNameForTask(task interface{}) string {
208 typeName := fmt.Sprintf("%T", task)

Callers 3

AddTaskMethod · 0.85
EnsureTaskMethod · 0.85
LessMethod · 0.85

Calls 3

ValueOfFunction · 0.85
TypeNameForTaskFunction · 0.85
GetNameMethod · 0.65

Tested by

no test coverage detected