File size: 612 Bytes
ca7217f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | package engine
import (
"time"
mt "github.com/metatube-community/metatube-sdk-go/provider"
)
type Option func(*Engine)
func WithEngineName(name string) Option {
return func(e *Engine) {
e.name = name
}
}
func WithRequestTimeout(timeout time.Duration) Option {
return func(e *Engine) {
e.timeout = timeout
}
}
func WithActorProviderConfig(name string, config mt.Config) Option {
return func(e *Engine) {
e.actorProviderConfigs.Set(name, config)
}
}
func WithMovieProviderConfig(name string, config mt.Config) Option {
return func(e *Engine) {
e.movieProviderConfigs.Set(name, config)
}
}
|