Documentation
¶
Index ¶
- type Client
- func (c *Client) Cache() *cache.Cache
- func (c *Client) Close() error
- func (c *Client) Config() *types.Config
- func (c *Client) DiscoverPlugin(ctx context.Context, name string) error
- func (c *Client) EventBus() *communication.EventBus
- func (c *Client) ExecutePlugin(name, operation string, args []string) (int, error)
- func (c *Client) GetState(ctx context.Context, key string) (map[string]interface{}, error)
- func (c *Client) InstallPlugin(ctx context.Context, ref, version string) error
- func (c *Client) List(ctx context.Context, repository string) ([]string, error)
- func (c *Client) ListPlugins() ([]*types.PluginInfo, error)
- func (c *Client) PluginManager() *plugin.Manager
- func (c *Client) PluginRegistry() *communication.PluginRegistry
- func (c *Client) Publish(ctx context.Context, eventType communication.EventType, pluginID string, ...) error
- func (c *Client) Pull(ctx context.Context, ref string, writer io.Writer) error
- func (c *Client) Push(ctx context.Context, ref string, reader io.Reader, mediaType string) error
- func (c *Client) RegisterPlugin(ctx context.Context, name, version, path string) error
- func (c *Client) Registry() *registry.Client
- func (c *Client) SetState(ctx context.Context, key string, pluginID string, value map[string]interface{}, ...) error
- func (c *Client) StateStore() *communication.StateStore
- func (c *Client) Subscribe(topic communication.EventType, handler communication.EventHandler)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main public API for interacting with the delivery station
func (*Client) DiscoverPlugin ¶
DiscoverPlugin discovers a plugin by name Note: This returns communication.PluginInfo internally
func (*Client) EventBus ¶
func (c *Client) EventBus() *communication.EventBus
EventBus returns the event bus
func (*Client) ExecutePlugin ¶
ExecutePlugin runs a plugin command
func (*Client) InstallPlugin ¶
InstallPlugin installs a plugin from a reference
func (*Client) ListPlugins ¶
func (c *Client) ListPlugins() ([]*types.PluginInfo, error)
ListPlugins returns all installed plugins
func (*Client) PluginManager ¶
PluginManager returns the plugin manager
func (*Client) PluginRegistry ¶
func (c *Client) PluginRegistry() *communication.PluginRegistry
PluginRegistry returns the plugin registry
func (*Client) Publish ¶
func (c *Client) Publish(ctx context.Context, eventType communication.EventType, pluginID string, data map[string]interface{}) error
Publish publishes an event to the event bus
func (*Client) RegisterPlugin ¶
RegisterPlugin registers a plugin in the plugin registry Note: This uses communication.PluginInfo internally
func (*Client) SetState ¶
func (c *Client) SetState(ctx context.Context, key string, pluginID string, value map[string]interface{}, ttl *time.Duration) error
SetState sets state by key
func (*Client) StateStore ¶
func (c *Client) StateStore() *communication.StateStore
StateStore returns the state store
func (*Client) Subscribe ¶
func (c *Client) Subscribe(topic communication.EventType, handler communication.EventHandler)
Subscribe subscribes to events from the event bus
type Option ¶
Option is a functional option for configuring the Client
func WithPluginManager ¶
WithPluginManager sets the plugin manager
func WithRegistry ¶
WithRegistry sets the registry client