backend

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Started() bool
	Version() string
	Logs() <-chan string
	Restart() error
	Shutdown()
	SyncUser(context.Context, *common.User) error
	SyncUsers(context.Context, []*common.User) error
	UpdateUsers(context.Context, []*common.User) error
	UpdateUsersAndRestart(context.Context, []*common.User) error
	GetSysStats(context.Context) (*common.BackendStatsResponse, error)
	GetStats(context.Context, *common.StatRequest) (*common.StatResponse, error)
	GetOutboundsLatency(context.Context, *common.LatencyRequest) (*common.LatencyResponse, error)
	GetUserOnlineStats(context.Context, string) (*common.OnlineStatResponse, error)
	GetUserOnlineIpListStats(context.Context, string) (*common.StatsOnlineIpListResponse, error)
}

type ConfigKey

type ConfigKey struct{}

type RoutingBackend added in v0.5.4

type RoutingBackend interface {
	ListRoutingRules(ctx context.Context) (*common.RoutingRulesResponse, error)
	GetBalancerInfo(ctx context.Context, tag string) (*common.BalancerInfoResponse, error)
	TestRoute(ctx context.Context, req *common.TestRouteRequest) (*common.RouteResult, error)
	AddRoutingRule(ctx context.Context, ruleJSON string, shouldAppend bool) error
	RemoveRoutingRule(ctx context.Context, ruleTag string) error
	OverrideBalancerTarget(ctx context.Context, balancerTag, target string) error
}

RoutingBackend is implemented by backends that expose xray RoutingService. Only *xray.Xray implements it; controller handlers type-assert it and return codes.Unimplemented for backends that do not (e.g. WireGuard).

type UsersKey

type UsersKey struct{}

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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