Documentation ¶
Overview ¶
Package client provides a client to access to token bucket server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Take takes tokens from server. Take(chunkKey string, bucketKeys ...string) (bool, error) // TakeContext takes tokens from server. TakeContext(ctx context.Context, chunkKey string, bucketKeys ...string) (bool, error) // Ping verifies a connection to the server is still alive. Ping() error // PingContext verifies a connection to the server is still alive. PingContext(ctx context.Context) error // Close closes a connection. Close() error }
Client is a client to access to token bucket server.
func NewInsecureClient ¶
NewInsecureClient constructs a new client without TLS.
Click to show internal directories.
Click to hide internal directories.