Documentation ¶
Overview ¶
Package chrysom provides a client in order to interact with argus.
Index ¶
- type Auth
- type Client
- func (c *Client) GetItems(owner string) ([]model.Item, error)
- func (c *Client) Push(item model.Item, owner string) (string, error)
- func (c *Client) Remove(id string, owner string) (model.Item, error)
- func (c *Client) SetListener(listener Listener) error
- func (c *Client) Stop(context context.Context)
- type ClientConfig
- type ConfigureListener
- type Listener
- type ListenerFunc
- type Option
- type PushReader
- type Pusher
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { JWT acquire.RemoteBearerTokenAcquirerOptions Basic string }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func CreateClient ¶
func CreateClient(config ClientConfig, options ...Option) (*Client, error)
func (*Client) SetListener ¶
type ClientConfig ¶
type ConfigureListener ¶
type ListenerFunc ¶
func (ListenerFunc) Update ¶
func (listner ListenerFunc) Update(items []model.Item)
type Option ¶
type Option func(r *storeConfig)
Option is the function used to configure a store.
func WithListener ¶
WithListener sets a Listener to use for the store.
func WithLogger ¶
WithLogger sets a logger to use for the store.
func WithStorage ¶
WithStorage sets a Pusher to use for the store.
type PushReader ¶ added in v0.3.3
type Pusher ¶
type Pusher interface { // Push applies user configurable for registering an item returning the id // i.e. updated the storage with said item. Push(item model.Item, owner string) (string, error) // Remove will remove the item from the store Remove(id string, owner string) (model.Item, error) // Stop will stop all threads and cleanup any necessary resources Stop(context context.Context) }
Click to show internal directories.
Click to hide internal directories.