darkrpc_deprecated

package
v1.145.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	Log = logus.Log.WithScope("darkgrpc")
)
View Source
var RPCPort = 8100

Functions

This section is empty.

Types

type Args

type Args struct {
}

type ClientOpt

type ClientOpt func(r *ClientRpc)

func WithPortCli

func WithPortCli(port int) ClientOpt

func WithSockCli

func WithSockCli(sock string) ClientOpt

func WithTcpAddress

func WithTcpAddress(address 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 *appdata.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 *appdata.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
client command
server_launch command

Jump to

Keyboard shortcuts

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