MCPcopy Index your code
hub / github.com/Monibuca/engine / SetStuff

Method SetStuff

track/base.go:68–82  ·  view source on GitHub ↗
(stuff ...any)

Source from the content-addressed store, hash-verified

66}
67
68func (bt *Base[T, F]) SetStuff(stuff ...any) {
69 for _, s := range stuff {
70 switch v := s.(type) {
71 case common.IStream:
72 bt.Zap = v.With(zap.String("track", bt.Name))
73 case common.IPuber:
74 bt.Publisher = v
75 bt.Zap = v.With(zap.String("track", bt.Name))
76 case common.TrackState:
77 bt.State = v
78 case string:
79 bt.Name = v
80 }
81 }
82}
83
84func (bt *Base[T, F]) GetPublisher() common.IPuber {
85 return bt.Publisher

Callers

nothing calls this directly

Calls 2

WithMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected