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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interval

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

Interval prom interval.

func NewInterval

func NewInterval(c *IntervalConfig) *Interval

NewInterval new a interval instance.

func (*Interval) MTS

func (s *Interval) MTS(c context.Context, mtStr string) int64

MTS get mtime ts from mtime str with interval's counter.

func (*Interval) Prom

func (s *Interval) Prom(c context.Context, mts int64)

Prom prom interval if mts > 0.

type IntervalConfig

type IntervalConfig struct {
	Name string
	Rate int64
}

IntervalConfig interval config.

type Service

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

Service service.

func New

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

New new a service instance.

func (*Service) Close

func (s *Service) Close() (err error)

Close close service, including closing dao.

func (*Service) Ping

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

Ping check server ok.

func (*Service) UpdateAsoAccount

func (s *Service) UpdateAsoAccount(c context.Context, t *model.AsoAccount, flag int) (affected int64, err error)

UpdateAsoAccount update aso account.

Jump to

Keyboard shortcuts

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