client

package
v0.0.0-...-4ee66c9 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

provides a go module to establish connection to nodare-db

Index

Constants

View Source
const DefaultAddr = "localhost:2420"
View Source
const DefaultAddrSSL = "localhost:2420"
View Source
const DefaultAddrTCPsocket = "localhost:3420"
View Source
const DefaultAddrTLSsocket = "localhost:4420"
View Source
const DefaultCliConnectTimeout = time.Duration(9 * time.Second)
View Source
const DefaultIdleCliTimeout = time.Duration(60 * time.Second)
View Source
const DefaultRequestTimeout = time.Duration(9 * time.Second)

Variables

This section is empty.

Functions

func Construct_SOCK_GetMany

func Construct_SOCK_GetMany(key []string)

func Escape

func Escape(any string) string

escape before sending

func EscapeCR

func EscapeCR(any string) string

func EscapeLF

func EscapeLF(any string) string

func UnEscape

func UnEscape(any string) string

unescape after retrieval

func UnEscapeCR

func UnEscapeCR(any string) string

func UnEscapeLF

func UnEscapeLF(any string) string

Types

type CliHandler

type CliHandler struct {
	Clients []*Client
	// contains filtered or unexported fields
}

func NewCliHandler

func NewCliHandler(logs ilog.ILOG) (cli *CliHandler)

func (*CliHandler) NewCli

func (cliH *CliHandler) NewCli(opts *Options) (*Client, error)

type Client

type Client struct {
	Mode int // 1=http(s) 2=socket
	// contains filtered or unexported fields
}

func (*Client) CliConnect

func (c *Client) CliConnect(client *Client) (*Client, error)

func (*Client) HTTP_Del

func (c *Client) HTTP_Del(key string, resp *string) (err error)

func (*Client) HTTP_Get

func (c *Client) HTTP_Get(key string, val *string, found *bool) error

func (*Client) HTTP_Set

func (c *Client) HTTP_Set(key string, value string, resp *string) (err error)

func (*Client) SOCK_Del

func (c *Client) SOCK_Del(key string, resp *string, nfk *string) (err error)

func (*Client) SOCK_Get

func (c *Client) SOCK_Get(key string, resp *string, nfk *string, found *bool) (err error)

func (*Client) SOCK_GetMany

func (c *Client) SOCK_GetMany(keys *[]string) (err error)

func (*Client) SOCK_Set

func (c *Client) SOCK_Set(key string, val string, resp *string) (err error)

func (*Client) Transport

func (c *Client) Transport()

type Options

type Options struct {
	Addr        string
	Mode        int
	SSL         bool
	SSLinsecure bool
	Auth        string
	Daemon      bool
	RunTest     bool
	LogFile     string
	StopChan    chan struct{}
	WG          sync.WaitGroup
	Logs        ilog.ILOG
}

Jump to

Keyboard shortcuts

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