You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want go use different data sources for Providers, but not create multiple providers with same decoding logic.
Proposed, to create core.DataSource plugin, that will contain logic of getting encoded ammo bytes, and use it as nested plugin in Providers that takes bytes from somewhere and decodes them.
Here some draft:
typeDataSource {
// Open opens data source. // Returned source can be file, socket, string or byte reader, or anything else, that implements// more that io.Reader, so it's ok to check if source is io.Seeker, and seek if it is.// Specific type checking (*os.File, for example) highly not recommended - use interfaces.Open() (sourceio.Closer, errerror)
}
What DataSources can be implemented:
file (filepath to open)
socket (some string, that can be passed to net.Listen)
url (http/https URL to download)
inline (string inlined to config)
The text was updated successfully, but these errors were encountered:
We want go use different data sources for Providers, but not create multiple providers with same decoding logic.
Proposed, to create
core.DataSource
plugin, that will contain logic of getting encoded ammo bytes, and use it as nested plugin in Providers that takes bytes from somewhere and decodes them.Here some draft:
What DataSources can be implemented:
The text was updated successfully, but these errors were encountered: