service

package
v0.0.0-...-36f00d2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPauseBetweenPolls = 1000
	MinPauseBetweenPolls = 50
)
View Source
const DEFAULT_TTL = 10 * 60 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func NewCache

func NewCache(rc *redis.Client) *Cache

func (*Cache) Close

func (c *Cache) Close()

func (*Cache) Get

func (c *Cache) Get(ctx context.Context, key string) (r storage.Request, err error)

func (*Cache) InitRequest

func (c *Cache) InitRequest(ctx context.Context, key string, r storage.Request) error

func (*Cache) Len

func (c *Cache) Len() int

func (*Cache) Set

func (c *Cache) Set(ctx context.Context, key string, r storage.Request) error

type TGService

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

func NewTGService

func NewTGService(rc *redis.Client, cache *Cache) (*TGService, error)

func (*TGService) Close

func (tg *TGService) Close()

func (*TGService) Run

func (tg *TGService) Run()

type WebService

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

func NewWebService

func NewWebService(cache *Cache) *WebService

func (*WebService) Get

func (srv *WebService) Get(ctx echo.Context) error

func (*WebService) Post

func (srv *WebService) Post(ctx echo.Context) error

Jump to

Keyboard shortcuts

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