service

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 33 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 impls main logics as service for datacolection app.

func NewService

func NewService(ctx context.Context, engine *backbone.Engine) *Service

NewService creates a new Service object.

func (*Service) Healthz

func (s *Service) Healthz(req *restful.Request, resp *restful.Response)

Healthz is a HTTP restful interface for health check.

func (*Service) ListSubscriptions

func (s *Service) ListSubscriptions(req *restful.Request, resp *restful.Response)

ListSubscriptions lists all subscriptions in cc.

func (*Service) Ping

func (s *Service) Ping(req *restful.Request, resp *restful.Response)

func (*Service) SetAuthorizer

func (s *Service) SetAuthorizer(authorizer ac.AuthorizeInterface)

func (*Service) SetCache

func (s *Service) SetCache(db *redis.Client)

SetCache setups cc main redis.

func (*Service) SetDB

func (s *Service) SetDB(db dal.RDB)

SetDB setups database.

func (*Service) SetDistributer

func (s *Service) SetDistributer(distributer *distribution.Distributor)

SetDistributer setups event subscription distributer.

func (*Service) Subscribe

func (s *Service) Subscribe(req *restful.Request, resp *restful.Response)

Subscribe subscribes target resource event in callback mode.

func (*Service) Telnet

func (s *Service) Telnet(req *restful.Request, resp *restful.Response)

func (*Service) UnSubscribe

func (s *Service) UnSubscribe(req *restful.Request, resp *restful.Response)

UnSubscribe unsubscribes target resource event in callback mode.

func (*Service) UpdateSubscription

func (s *Service) UpdateSubscription(req *restful.Request, resp *restful.Response)

UpdateSubscription updates target subscription in callback mode.

func (*Service) WatchEvent

func (s *Service) WatchEvent(req *restful.Request, resp *restful.Response)

func (*Service) WebService

func (s *Service) WebService() *restful.Container

WebService setups a new restful web service.

Jump to

Keyboard shortcuts

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