Documentation
¶
Index ¶
Constants ¶
const DataUsageSyncerName = "dataUsageSyncer"
DataUsageSyncerName constant should not be used directly when implementing plugins. It's the registration name for the data usage syncer plugin, used by the CLI and the cli-plugin-base library (RegisterPlugins function) to register the plugins.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataUsageSyncConfig ¶
DataUsageSyncConfig represents the configuration that is passed from the CLI to the DataUsageSyncer plugin interface. It contains all the necessary configuration parameters for the plugin to function.
type DataUsageSyncResult ¶
type DataUsageSyncResult struct {
Error *api.ErrorResult
}
DataUsageSyncResult represents the result from the data usage sync process. A potential error is also modeled in here so specific errors remain intact when passed over RPC.
type DataUsageSyncer ¶
type DataUsageSyncer interface {
SyncDataUsage(config *DataUsageSyncConfig) DataUsageSyncResult
}
DataUsageSyncer interface needs to be implemented by any plugin that wants to import data usage information into a Raito data source.
type DataUsageSyncerPlugin ¶
type DataUsageSyncerPlugin struct {
Impl DataUsageSyncer
}
DataUsageSyncerPlugin is used on the server (CLI) and client (plugin) side to integrate with the plugin system. A plugin should not be using this directly, but instead depend on the cli-plugin-base library to register the plugins.
func (DataUsageSyncerPlugin) Client ¶
func (DataUsageSyncerPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*DataUsageSyncerPlugin) Server ¶
func (p *DataUsageSyncerPlugin) Server(*plugin.MuxBroker) (interface{}, error)