service

package
v0.0.0-...-a8e6978 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FetchUserInterval     time.Duration
	ReportTrafficInterval time.Duration
}

type Service

type Service interface {
	Start() error
	Close() error
}

type TrafficItem

type TrafficItem struct {
	Up    *counter.Counter
	Down  *counter.Counter
	Count *counter.Counter
}

type TrafficManager

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

type UserManager

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

type UsersService

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

func NewUsersService

func NewUsersService(config *Config, client *api.Client) *UsersService

func (*UsersService) Auth

func (s *UsersService) Auth(uuid string) (int, bool)

func (*UsersService) Close

func (s *UsersService) Close() error

func (*UsersService) FetchUsersTask

func (s *UsersService) FetchUsersTask() error

func (*UsersService) GetTrafficItem

func (s *UsersService) GetTrafficItem(userId int) *TrafficItem

func (*UsersService) Init

func (s *UsersService) Init() error

func (*UsersService) ReportTrafficsTask

func (s *UsersService) ReportTrafficsTask() error

func (*UsersService) Start

func (s *UsersService) Start() error

Jump to

Keyboard shortcuts

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