jdbc

package module
v0.0.0-...-8c5fa05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2021 License: ISC Imports: 12 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Javazac database client

Go client for Javazac database websocket servers

Getting started

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotAuthenticated     = errors.New("not authenticated")
	ErrSubscriptionNotFound = errors.New("subscription not found")
	ErrEmptyKey             = errors.New("key empty or unset")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint string
	Logger   logrus.FieldLogger
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string, options ClientOptions) (*Client, error)

func (*Client) Close

func (s *Client) Close()

func (*Client) ConnectToWebsocket

func (s *Client) ConnectToWebsocket() error

func (*Client) GetByPrefix

func (s *Client) GetByPrefix(prefix string) (map[string]string, error)

func (*Client) GetJSON

func (s *Client) GetJSON(key string, dst interface{}) error

func (*Client) GetKey

func (s *Client) GetKey(key string) (string, error)

func (*Client) GetKeys

func (s *Client) GetKeys(keys []string) (map[string]string, error)

func (*Client) ListKeys

func (s *Client) ListKeys(prefix string) ([]string, error)

func (*Client) SetJSON

func (s *Client) SetJSON(key string, data interface{}) error

func (*Client) SetJSONs

func (s *Client) SetJSONs(data map[string]interface{}) error

func (*Client) SetKey

func (s *Client) SetKey(key string, data string) error

func (*Client) SetKeys

func (s *Client) SetKeys(data map[string]string) error

func (*Client) SubscribeKey

func (s *Client) SubscribeKey(key string) (chan KeyValuePair, error)

func (*Client) SubscribePrefix

func (s *Client) SubscribePrefix(prefix string) (chan KeyValuePair, error)

func (*Client) UnsubscribeKey

func (s *Client) UnsubscribeKey(key string, chn chan KeyValuePair) error

func (*Client) UnsubscribePrefix

func (s *Client) UnsubscribePrefix(prefix string, chn chan KeyValuePair) error

type ClientOptions

type ClientOptions struct {
	Headers http.Header
	Logger  logrus.FieldLogger
}

type KeyValuePair

type KeyValuePair struct {
	Key   string
	Value string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址