Documentation
¶
Overview ¶
Package kickplan provides a client to evaluate feature flags and work with metrics
Index ¶
- type Client
- func (c *Client) DecMetric(ctx context.Context, metric string, value int64, evalCtx eval.Context) error
- func (c *Client) GetBool(ctx context.Context, flag string, defaultValue bool, evalCtx eval.Context) (bool, error)
- func (c *Client) GetInt64(ctx context.Context, flag string, defaultValue int64, evalCtx eval.Context) (int64, error)
- func (c *Client) GetObject(ctx context.Context, flag string, defaultValue interface{}, ...) (interface{}, error)
- func (c *Client) GetString(ctx context.Context, flag string, defaultValue string, evalCtx eval.Context) (string, error)
- func (c *Client) IncMetric(ctx context.Context, metric string, value int64, evalCtx eval.Context) error
- func (c *Client) SetBool(ctx context.Context, flag string, value bool) error
- func (c *Client) SetMetric(ctx context.Context, metric string, value int64, evalCtx eval.Context) error
- 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 a Kickplan client.
func (*Client) DecMetric ¶
func (c *Client) DecMetric( ctx context.Context, metric string, value int64, evalCtx eval.Context, ) error
DecMetric decrements a metric.
func (*Client) GetBool ¶
func (c *Client) GetBool( ctx context.Context, flag string, defaultValue bool, evalCtx eval.Context, ) (bool, error)
GetBool returns a boolean flag.
func (*Client) GetInt64 ¶
func (c *Client) GetInt64( ctx context.Context, flag string, defaultValue int64, evalCtx eval.Context, ) (int64, error)
GetInt64 returns a float64 flag.
func (*Client) GetObject ¶
func (c *Client) GetObject( ctx context.Context, flag string, defaultValue interface{}, evalCtx eval.Context, ) (interface{}, error)
GetObject returns a object flag.
func (*Client) GetString ¶
func (c *Client) GetString( ctx context.Context, flag string, defaultValue string, evalCtx eval.Context, ) (string, error)
GetString returns a string flag.
func (*Client) IncMetric ¶
func (c *Client) IncMetric( ctx context.Context, metric string, value int64, evalCtx eval.Context, ) error
IncMetric increments a metric.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package adapter provides a way to work with flags and metrics
|
Package adapter provides a way to work with flags and metrics |
|
Package eval provides the context for the evaluation of flags
|
Package eval provides the context for the evaluation of flags |
|
examples
|
|
|
inmemory
command
A simple example of using in-memory adapter
|
A simple example of using in-memory adapter |
|
kickplan
command
A simple example of using Kickplan adapter
|
A simple example of using Kickplan adapter |
Click to show internal directories.
Click to hide internal directories.