stats

package
v0.0.0-...-db0aad3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	GetTasks(ctx context.Context, taskIds []string, token string) (map[string]*proto.BaseStatics, error)
	GetTaskGroup(ctx context.Context, group, token string) (map[string]*proto.BaseStatics, error)
	GetPushCount(ctx context.Context, token string) ([]*proto.BasePushCount, error)
	GetPushDataByDay(ctx context.Context, date time.Time, token string) (map[string]*proto.BaseStatics, error)
	GetUserDataByDay(ctx context.Context, date time.Time, token string) (map[string]map[string]int32, error)
	GetOnlineUserBy24H(ctx context.Context, token string) (map[int64]int32, error)
	Close()
}

type AgentMgr

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

func NewAgentMgr

func NewAgentMgr() (*AgentMgr, error)

func (*AgentMgr) Close

func (m *AgentMgr) Close()

func (*AgentMgr) GetOnlineUserBy24H

func (m *AgentMgr) GetOnlineUserBy24H(ctx context.Context, uniqueId core.UniqueId, token string) (map[int64]int32, error)

func (*AgentMgr) GetPushCount

func (m *AgentMgr) GetPushCount(ctx context.Context, uniqueId core.UniqueId, token string) ([]*proto.BasePushCount, error)

func (*AgentMgr) GetPushDataByDay

func (m *AgentMgr) GetPushDataByDay(ctx context.Context, uniqueId core.UniqueId, date time.Time, token string) (map[string]*proto.BaseStatics, error)

func (*AgentMgr) GetTaskGroup

func (m *AgentMgr) GetTaskGroup(ctx context.Context, uniqueId core.UniqueId, group, token string) (map[string]*proto.BaseStatics, error)

func (*AgentMgr) GetTasks

func (m *AgentMgr) GetTasks(ctx context.Context, uniqueId core.UniqueId, taskIds []string, token string) (map[string]*proto.BaseStatics, error)

func (*AgentMgr) GetUserDataByDay

func (m *AgentMgr) GetUserDataByDay(ctx context.Context, uniqueId core.UniqueId, date time.Time, token string) (map[string]map[string]int32, error)

func (*AgentMgr) RegisterAgent

func (m *AgentMgr) RegisterAgent(uniqueId core.UniqueId, agent Agent) error

type GeTuiStats

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

func NewGeTuiStats

func NewGeTuiStats(apiUrl, appId string, hc *http.Client) (*GeTuiStats, error)

func (*GeTuiStats) Close

func (g *GeTuiStats) Close()

func (*GeTuiStats) GetOnlineUserBy24H

func (g *GeTuiStats) GetOnlineUserBy24H(ctx context.Context, token string) (map[int64]int32, error)

func (*GeTuiStats) GetPushCount

func (g *GeTuiStats) GetPushCount(ctx context.Context, token string) ([]*proto.BasePushCount, error)

func (*GeTuiStats) GetPushDataByDay

func (g *GeTuiStats) GetPushDataByDay(ctx context.Context, date time.Time, token string) (map[string]*proto.BaseStatics, error)

func (*GeTuiStats) GetTaskGroup

func (g *GeTuiStats) GetTaskGroup(ctx context.Context, group, token string) (map[string]*proto.BaseStatics, error)

func (*GeTuiStats) GetTasks

func (g *GeTuiStats) GetTasks(ctx context.Context, taskIds []string, token string) (map[string]*proto.BaseStatics, error)

func (*GeTuiStats) GetUserDataByDay

func (g *GeTuiStats) GetUserDataByDay(ctx context.Context, date time.Time, token string) (map[string]map[string]int32, error)

type Server

type Server struct {
	*proto.UnimplementedStatsServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conf *core.PushConfig) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) GetOnlineUserBy24H

func (s *Server) GetOnlineUserBy24H(ctx context.Context, in *proto.GetOnlineUserBy24HReq) (*proto.GetOnlineUserBy24HResp, error)

func (*Server) GetPushCount

func (s *Server) GetPushCount(ctx context.Context, in *proto.GetPushCountReq) (*proto.GetPushCountResp, error)

func (*Server) GetPushDataByDay

func (s *Server) GetPushDataByDay(ctx context.Context, in *proto.GetPushDataByDayReq) (*proto.GetPushDataByDayResp, error)

func (*Server) GetTaskGroup

func (s *Server) GetTaskGroup(ctx context.Context, in *proto.GetTaskGroupReq) (*proto.GetTaskGroupResp, error)

func (*Server) GetTasks

func (s *Server) GetTasks(ctx context.Context, in *proto.GetTasksReq) (*proto.GetTasksResp, error)

func (*Server) GetUserDataByDay

func (s *Server) GetUserDataByDay(ctx context.Context, in *proto.GetUserDataByDayReq) (*proto.GetUserDataByDayResp, error)

Jump to

Keyboard shortcuts

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