dragoncore

package
v0.0.0-...-98c1043 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Series = CollType("series")
	Kv     = CollType("kv")
)
View Source
const (
	DragonDBAuthKey = "InfDB.AuthToken.85629437"
)

Variables

This section is empty.

Functions

func DocIdIFToDEC

func DocIdIFToDEC(docId interface{}) (*gdecimal.Decimal, error)

Convert user-given origin interface{} document Id into internal document Id type - decimal.

func NewRPCChecker

func NewRPCChecker() grpcs.ParamChecker

Rules 'grpcs' package needs. Used to verify function parameters between RPC client and server.

Types

type CollType

type CollType string

type Config

type Config struct {
	ListenAddr         string         // Database server listen address.
	Platform           cloud.Platform // Which cloud.
	Region             string         // Id of cloud region to access from.
	AccessKeyEncryptMe string         // Cloud API key.
	SecretKeyEncryptMe string         // Cloud API secret.
	LAN                bool           // Use LAN endpoint or WAN endpoint to access cloud API.
	BucketPrefix       *string        // The name prefix of the buckets used by DragonDB in the cloud. If it is nil, "infdb" will be used, "infdbmeta" for index and "infdbchunk" for data.
	UsernameEncryptMe  string         // DragonDB server username.
	PasswordEncryptMe  string         // DragonDB server password.
}

DragonDB server configuration.

type Server

type Server struct {
	// contains filtered or unexported fields
}

DragonDB server.

func New

func New(option Config) (*Server, error)

Connect to cloud and initialize buckets needed for DragonDB.

func (*Server) Close

func (s *Server) Close() error

Shutdown server.

func (*Server) ListenClients

func (s *Server) ListenClients() error

Start RPC server, support both KCP and TCP.

func (*Server) RPCOnRequest

func (s *Server) RPCOnRequest(in grpcs.Request, out *grpcs.Reply) error

Handle 'grpcs' requests from clients.

Jump to

Keyboard shortcuts

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