service

package
v0.0.0-...-cba6ad5 Latest Latest
Warning

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

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

README

Service

Documentation

Index

Constants

View Source
const (
	CreatePrefixTag = "[RuleCreate]"
	UpdatePrefixTag = "[RuleUpdate]"
	DeletePrefixTag = "[RuleDelete]"
	QueryPrefixTag  = "[RuleQuery]"
	StartPrefixTag  = "[RuleStart]"
	StopPrefixTag   = "[RuleStop]"

	RuleRunning = 1
	RuleStopped = 0
)

Log prefix

View Source
const (
	ActionType_Republish  = "republish"
	ActionType_Kafka      = "kafka"
	ActionType_Bucket     = "bucket"
	ActionType_Chronus    = "clickhouse"
	ActionType_MYSQL      = "mysql"
	ActionType_POSTGRESQL = "postgresql"
	ActionType_REDIS      = "redis"
	ActionType_INFLUXDB   = "influxdb"
)

ActionType

Variables

View Source
var (
	ErrUnmatched      = errors.New("delete records are not matched whit user")
	ErrDeviceNotFound = errors.New("device not found")
)

Functions

func GetConnectInfoBySinkIdFromRedis

func GetConnectInfoBySinkIdFromRedis(id string) (*util.ConnectInfo, error)

Types

type MetricsService

type MetricsService struct {
	MetricsHandler http.Handler
}

func NewMetricsService

func NewMetricsService(mtrCollectors ...prometheus.Collector) *MetricsService

func (*MetricsService) Metrics

func (svc *MetricsService) Metrics(req *go_restful.Request, resp *go_restful.Response)

type OpenapiService

type OpenapiService struct {
	v1.UnimplementedOpenapiServer
}

OpenapiService is a openapi service.

func NewOpenapiService

func NewOpenapiService() *OpenapiService

NewOpenapiService new a openapi service.

func (*OpenapiService) AddonsIdentify

AddonsIdentify implements AddonsIdentify.OpenapiServer.

func (*OpenapiService) Identify

Identify implements Identify.OpenapiServer.

func (*OpenapiService) Status

Status implements Status.OpenapiServer.

func (*OpenapiService) TenantDisable

TenantDisable implements TenantDisable.OpenapiServer.

func (*OpenapiService) TenantEnable

TenantEnable implements TenantEnable.OpenapiServer.

type RulesService

type RulesService struct {
	pb.UnimplementedRulesServer
}

func NewRulesService

func NewRulesService() *RulesService

func (*RulesService) ActionVerify

func (s *RulesService) ActionVerify(ctx context.Context, req *pb.ASVerifyReq) (*pb.ASVerifyResp, error)

func (*RulesService) AddDevicesToRule

func (s *RulesService) AddDevicesToRule(ctx context.Context, req *pb.AddDevicesToRuleReq) (*emptypb.Empty, error)

func (*RulesService) ChangeErrSubscribe

func (s *RulesService) ChangeErrSubscribe(ctx context.Context, req *pb.ChangeErrSubscribeReq) (*emptypb.Empty, error)

func (*RulesService) CreateRuleTarget

func (s *RulesService) CreateRuleTarget(ctx context.Context, req *pb.CreateRuleTargetReq) (*pb.CreateRuleTargetResp, error)

func (*RulesService) DeleteRuleTarget

func (s *RulesService) DeleteRuleTarget(ctx context.Context, req *pb.DeleteRuleTargetReq) (*emptypb.Empty, error)

func (*RulesService) ErrSubscribe

func (s *RulesService) ErrSubscribe(ctx context.Context, req *pb.ErrSubscribeReq) (*emptypb.Empty, error)

func (RulesService) ErrUnsubscribe

func (s RulesService) ErrUnsubscribe(ctx context.Context, req *pb.ErrUnsubscribeReq) (*emptypb.Empty, error)

func (*RulesService) GetRuleDevices

func (s *RulesService) GetRuleDevices(ctx context.Context, req *pb.RuleDevicesReq) (*pb.RuleDevicesResp, error)

func (*RulesService) GetRuleDevicesID

func (s *RulesService) GetRuleDevicesID(ctx context.Context, req *pb.RuleDevicesIDReq) (*pb.RuleDevicesIDResp, error)

func (*RulesService) GetTableDetails

func (*RulesService) GetTableMap

func (s *RulesService) GetTableMap(ctx context.Context, req *pb.ASGetTableMapReq) (*pb.ASGetTableMapResp, error)

func (*RulesService) ListRuleTarget

func (s *RulesService) ListRuleTarget(ctx context.Context, req *pb.ListRuleTargetReq) (*pb.ListRuleTargetResp, error)

func (*RulesService) RemoveDeviceFromAllRule

func (s *RulesService) RemoveDeviceFromAllRule(ctx context.Context, req *pb.RemoveDeviceFromAllRuleReq) (*emptypb.Empty, error)

func (*RulesService) RemoveDevicesFromRule

func (s *RulesService) RemoveDevicesFromRule(ctx context.Context, req *pb.RemoveDevicesFromRuleReq) (*emptypb.Empty, error)

func (*RulesService) RuleCreate

func (s *RulesService) RuleCreate(ctx context.Context, req *pb.RuleCreateReq) (res *pb.RuleCreateResp, err error)

func (*RulesService) RuleDelete

func (s *RulesService) RuleDelete(ctx context.Context, req *pb.RuleDeleteReq) (*emptypb.Empty, error)

func (*RulesService) RuleGet

func (s *RulesService) RuleGet(ctx context.Context, req *pb.RuleGetReq) (*pb.Rule, error)

func (*RulesService) RuleQuery

func (s *RulesService) RuleQuery(ctx context.Context, req *pb.RuleQueryReq) (*pb.RuleQueryResp, error)

func (RulesService) RuleSQLUpdate

func (s RulesService) RuleSQLUpdate(ctx context.Context, req *pb.RuleSqlUpdateReq) (*pb.RuleSqlUpdateResp, error)

func (*RulesService) RuleStatusSwitch

func (s *RulesService) RuleStatusSwitch(ctx context.Context, req *pb.RuleStatusSwitchReq) (*pb.RuleStatusSwitchResp, error)

func (*RulesService) RuleUpdate

func (s *RulesService) RuleUpdate(ctx context.Context, req *pb.RuleUpdateReq) (*pb.RuleUpdateResp, error)

func (*RulesService) TableList

func (s *RulesService) TableList(ctx context.Context, req *pb.ASTableListReq) (*pb.ASTableListResp, error)

func (*RulesService) TestConnectToKafka

func (s *RulesService) TestConnectToKafka(ctx context.Context, req *pb.TestConnectToKafkaReq) (*emptypb.Empty, error)

func (*RulesService) UpdateRuleTarget

func (s *RulesService) UpdateRuleTarget(ctx context.Context, req *pb.UpdateRuleTargetReq) (*pb.UpdateRuleTargetResp, error)

func (*RulesService) UpdateTableMap

Jump to

Keyboard shortcuts

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