···11package replication
2233-import "context"
33+import (
44+ "context"
55+66+ "stream.place/streamplace/pkg/config"
77+ "stream.place/streamplace/pkg/media"
88+ "stream.place/streamplace/pkg/streamplace"
99+)
410511type Replicator interface {
66- NewSegment(context.Context, []byte)
1212+ // start the replicator, ending on context cancellation. if your replicator doesn't need to start anything, you can just block on <-ctx.Done()
1313+ Start(context.Context, *config.CLI) error
1414+ // hey, we have a new segment! send it to whoever
1515+ SendSegment(context.Context, *media.NewSegmentNotification) error
1616+ // populate this origin record with whatever fields are pertinent to your replicator
1717+ BuildOriginRecord(*streamplace.BroadcastOrigin) error
718}