darkrpc

package
v1.63.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const DarkstatSock = "/tmp/darkstat/rpc.sock"

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
}

type ClientOpt

type ClientOpt func(r *ClientRpc)

func WithSockCli

func WithSockCli(sock string) ClientOpt

type ClientRpc

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

/ CLIENT///////////////////

func (*ClientRpc) GetBases

func (r *ClientRpc) GetBases(args Args, reply *Reply) error

func (*ClientRpc) GetHealth

func (r *ClientRpc) GetHealth(args Args, reply *bool) error

type Reply

type Reply struct {
	Bases []*configs_export.Base
}

type RpcI

type RpcI interface {
	GetBases(args Args, reply *Reply) error
	GetHealth(args Args, reply *bool) error
}

func NewClient

func NewClient(opts ...ClientOpt) RpcI

func NewRpc

func NewRpc(app_data *router.AppData) RpcI

type RpcServer

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

func NewRpcServer

func NewRpcServer(opts ...ServerOpt) *RpcServer

func (*RpcServer) Close

func (r *RpcServer) Close()

func (*RpcServer) Serve

func (r *RpcServer) Serve(app_data *router.AppData)

type ServerOpt

type ServerOpt func(r *RpcServer)

func WithPortSrv

func WithPortSrv(port int) ServerOpt

func WithSockSrv

func WithSockSrv(sock string) ServerOpt

type ServerRpc

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

func (*ServerRpc) GetBases

func (t *ServerRpc) GetBases(args Args, reply *Reply) error

func (*ServerRpc) GetHealth

func (t *ServerRpc) GetHealth(args Args, reply *bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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