Documentation ¶
Index ¶
- Constants
- Variables
- func LoadStreamingServices(appOpts AppOptions, appCodec types.Codec, logger log.Logger, ...) ([]types.StreamingService, *sync.WaitGroup, error)
- func NewFileStreamingService(opts AppOptions, keys []types.StoreKey, marshaller types.Codec, ...) (types.StreamingService, error)
- type AppOptions
- type ServiceConstructor
- type ServiceType
Constants ¶
const ( OptStreamersFilePrefix = "streamers.file.prefix" OptStreamersFileWriteDir = "streamers.file.write_dir" OptStreamersFileOutputMetadata = "streamers.file.output-metadata" OptStreamersFileStopNodeOnError = "streamers.file.stop-node-on-error" OptStreamersFileFsync = "streamers.file.fsync" OptStoreStreamers = "store.streamers" )
Streaming option keys
Variables ¶
var ServiceConstructorLookupTable = map[ServiceType]ServiceConstructor{ File: NewFileStreamingService, }
ServiceConstructorLookupTable is a mapping of streaming.ServiceTypes to streaming.ServiceConstructors types.
Functions ¶
func LoadStreamingServices ¶
func LoadStreamingServices( appOpts AppOptions, appCodec types.Codec, logger log.Logger, keys map[string]*types.KVStoreKey, homePath string, ) ([]types.StreamingService, *sync.WaitGroup, error)
LoadStreamingServices is a function for loading StreamingServices onto the BaseApp using the provided AppOptions, codec, and keys. It returns the WaitGroup and quit channel used to synchronize with the streaming services and any error that occurs during the setup.
func NewFileStreamingService ¶
func NewFileStreamingService( opts AppOptions, keys []types.StoreKey, marshaller types.Codec, logger log.Logger, homePath string, ) (types.StreamingService, error)
NewFileStreamingService is the streaming.ServiceConstructor function for creating a FileStreamingService.
Types ¶
type AppOptions ¶
type AppOptions interface {
Get(string) interface{}
}
AppOptions is an interface for accessing application options
type ServiceConstructor ¶
type ServiceConstructor func(AppOptions, []types.StoreKey, types.Codec, log.Logger, string) (types.StreamingService, error)
ServiceConstructor is used to construct a streaming service
func NewServiceConstructor ¶
func NewServiceConstructor(name string) (ServiceConstructor, error)
NewServiceConstructor returns the streaming.ServiceConstructor corresponding to the provided name.
type ServiceType ¶
type ServiceType int
ServiceType enum for specifying the type of StreamingService
const ( Unknown ServiceType = iota File )
func ServiceTypeFromString ¶
func ServiceTypeFromString(name string) ServiceType
ServiceTypeFromString returns the streaming.ServiceType corresponding to the provided name.
func (ServiceType) String ¶
func (sst ServiceType) String() string
String returns the string name of a streaming.ServiceType