service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service is reply-job service

func New

func New(c *conf.Config) (s *Service)

New return new service

func (*Service) AliasToType

func (s *Service) AliasToType(alias string) (t int32, exists bool)

AliasToType map alias to type

func (*Service) Close

func (s *Service) Close() error

Close close service

func (*Service) ListBusiness

func (s *Service) ListBusiness(c context.Context) (business []*reply.Business, err error)

ListBusiness return all non-deleted business record.

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping check service health

func (*Service) TypeToAlias

func (s *Service) TypeToAlias(t int32) (alias string, exists bool)

TypeToAlias map type to alias

func (*Service) UpSearchReply

func (s *Service) UpSearchReply(c context.Context, rps map[int64]*model.Reply) (err error)

UpSearchReply update search reply index.

func (*Service) Wait

func (s *Service) Wait()

Wait wait all chan close

type StatMsg

type StatMsg struct {
	Type         string `json:"type,omitempty"`
	ID           int64  `json:"id,omitempty"`
	Count        int    `json:"count,omitempty"`
	Oid          int64  `json:"origin_id,omitempty"`
	DislikeCount int    `json:"dislike_count,omitempty"`
	Timestamp    int64  `json:"timestamp,omitempty"`
	Mid          int64  `json:"mid,omitempty"`
}

StatMsg stat msg.

Jump to

Keyboard shortcuts

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