MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / NewWorkerItem

Function NewWorkerItem

gateway/apinto/entity/worker.go:21–23  ·  view source on GitHub ↗
(basic *BasicInfo, attr *T)

Source from the content-addressed store, hash-verified

19}
20
21func NewWorkerItem[T any](basic *BasicInfo, attr *T) *WorkerItem[T] {
22 return &WorkerItem[T]{Basic: basic, Attr: attr}
23}
24
25func (w *WorkerItem[T]) MarshalJSON() ([]byte, error) {
26 data, err := json.Marshal(w.Attr)

Callers 1

OnlineMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected