core

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddXNode

func AddXNode(node *models.Xnode) error

func ConnectToXNode

func ConnectToXNode(node *models.Xnode) (pb.XNodeGrpcClient, error)

Types

type SubService added in v0.2.1

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

func NewSubService added in v0.2.1

func NewSubService() *SubService

func (*SubService) GenerateUserSub added in v0.2.1

func (s *SubService) GenerateUserSub(token string) (string, error)

GenerateUserSub requests user's sub-content from xNodes and merge them together

type UserService

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

func NewUserService

func NewUserService() *UserService

func (*UserService) DisabledCallback

func (u *UserService) DisabledCallback() error

DisabledCallback is a callback-function to be called by XrayPanels when they have disabled a user due to traffic limit

func (*UserService) Register

func (u *UserService) Register(tid uint64, username string, packageName string) error

Register a user on local repo and send a "AddClient" request to panels

func (*UserService) SpawnRunners added in v0.2.1

func (u *UserService) SpawnRunners()

func (*UserService) Status

func (u *UserService) Status(uid uint64) (*models.Tuser, error)

func (*UserService) TrafficUsageRunner added in v0.2.1

func (u *UserService) TrafficUsageRunner()

TrafficUsageRunner runs periodically to fetch the latest traffic-usage from xPanels

func (*UserService) Unregister

func (u *UserService) Unregister(uid uint64) error

func (*UserService) Upgrade

func (u *UserService) Upgrade(uint642 uint64) error

Directories

Path Synopsis
e

Jump to

Keyboard shortcuts

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