Documentation ¶
Index ¶
- Constants
- Variables
- func GetConnectInfoBySinkIdFromRedis(id string) (*util.ConnectInfo, error)
- type MetricsService
- type OpenapiService
- func (s *OpenapiService) AddonsIdentify(ctx context.Context, in *openapi_v1.AddonsIdentifyRequest) (*openapi_v1.AddonsIdentifyResponse, error)
- func (s *OpenapiService) Identify(ctx context.Context, in *emptypb.Empty) (*openapi_v1.IdentifyResponse, error)
- func (s *OpenapiService) Status(ctx context.Context, in *emptypb.Empty) (*openapi_v1.StatusResponse, error)
- func (s *OpenapiService) TenantDisable(ctx context.Context, in *openapi_v1.TenantDisableRequest) (*openapi_v1.TenantDisableResponse, error)
- func (s *OpenapiService) TenantEnable(ctx context.Context, in *openapi_v1.TenantEnableRequest) (*openapi_v1.TenantEnableResponse, error)
- type RulesService
- func (s *RulesService) ActionVerify(ctx context.Context, req *pb.ASVerifyReq) (*pb.ASVerifyResp, error)
- func (s *RulesService) AddDevicesToRule(ctx context.Context, req *pb.AddDevicesToRuleReq) (*emptypb.Empty, error)
- func (s *RulesService) ChangeErrSubscribe(ctx context.Context, req *pb.ChangeErrSubscribeReq) (*emptypb.Empty, error)
- func (s *RulesService) CreateRuleTarget(ctx context.Context, req *pb.CreateRuleTargetReq) (*pb.CreateRuleTargetResp, error)
- func (s *RulesService) DeleteRuleTarget(ctx context.Context, req *pb.DeleteRuleTargetReq) (*emptypb.Empty, error)
- func (s *RulesService) ErrSubscribe(ctx context.Context, req *pb.ErrSubscribeReq) (*emptypb.Empty, error)
- func (s RulesService) ErrUnsubscribe(ctx context.Context, req *pb.ErrUnsubscribeReq) (*emptypb.Empty, error)
- func (s *RulesService) GetRuleDevices(ctx context.Context, req *pb.RuleDevicesReq) (*pb.RuleDevicesResp, error)
- func (s *RulesService) GetRuleDevicesID(ctx context.Context, req *pb.RuleDevicesIDReq) (*pb.RuleDevicesIDResp, error)
- func (s *RulesService) GetTableDetails(ctx context.Context, req *pb.ASGetTableDetailsReq) (*pb.ASGetTableDetailsResp, error)
- func (s *RulesService) GetTableMap(ctx context.Context, req *pb.ASGetTableMapReq) (*pb.ASGetTableMapResp, error)
- func (s *RulesService) ListRuleTarget(ctx context.Context, req *pb.ListRuleTargetReq) (*pb.ListRuleTargetResp, error)
- func (s *RulesService) RemoveDeviceFromAllRule(ctx context.Context, req *pb.RemoveDeviceFromAllRuleReq) (*emptypb.Empty, error)
- func (s *RulesService) RemoveDevicesFromRule(ctx context.Context, req *pb.RemoveDevicesFromRuleReq) (*emptypb.Empty, error)
- func (s *RulesService) RuleCreate(ctx context.Context, req *pb.RuleCreateReq) (res *pb.RuleCreateResp, err error)
- func (s *RulesService) RuleDelete(ctx context.Context, req *pb.RuleDeleteReq) (*emptypb.Empty, error)
- func (s *RulesService) RuleGet(ctx context.Context, req *pb.RuleGetReq) (*pb.Rule, error)
- func (s *RulesService) RuleQuery(ctx context.Context, req *pb.RuleQueryReq) (*pb.RuleQueryResp, error)
- func (s RulesService) RuleSQLUpdate(ctx context.Context, req *pb.RuleSqlUpdateReq) (*pb.RuleSqlUpdateResp, error)
- func (s *RulesService) RuleStatusSwitch(ctx context.Context, req *pb.RuleStatusSwitchReq) (*pb.RuleStatusSwitchResp, error)
- func (s *RulesService) RuleUpdate(ctx context.Context, req *pb.RuleUpdateReq) (*pb.RuleUpdateResp, error)
- func (s *RulesService) TableList(ctx context.Context, req *pb.ASTableListReq) (*pb.ASTableListResp, error)
- func (s *RulesService) TestConnectToKafka(ctx context.Context, req *pb.TestConnectToKafkaReq) (*emptypb.Empty, error)
- func (s *RulesService) UpdateRuleTarget(ctx context.Context, req *pb.UpdateRuleTargetReq) (*pb.UpdateRuleTargetResp, error)
- func (s *RulesService) UpdateTableMap(ctx context.Context, req *pb.ASUpdateTableMapReq) (*pb.ASUpdateTableMapResp, error)
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 ¶
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 ¶
func (s *OpenapiService) AddonsIdentify(ctx context.Context, in *openapi_v1.AddonsIdentifyRequest) (*openapi_v1.AddonsIdentifyResponse, error)
AddonsIdentify implements AddonsIdentify.OpenapiServer.
func (*OpenapiService) Identify ¶
func (s *OpenapiService) Identify(ctx context.Context, in *emptypb.Empty) (*openapi_v1.IdentifyResponse, error)
Identify implements Identify.OpenapiServer.
func (*OpenapiService) Status ¶
func (s *OpenapiService) Status(ctx context.Context, in *emptypb.Empty) (*openapi_v1.StatusResponse, error)
Status implements Status.OpenapiServer.
func (*OpenapiService) TenantDisable ¶
func (s *OpenapiService) TenantDisable(ctx context.Context, in *openapi_v1.TenantDisableRequest) (*openapi_v1.TenantDisableResponse, error)
TenantDisable implements TenantDisable.OpenapiServer.
func (*OpenapiService) TenantEnable ¶
func (s *OpenapiService) TenantEnable(ctx context.Context, in *openapi_v1.TenantEnableRequest) (*openapi_v1.TenantEnableResponse, error)
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 (s *RulesService) GetTableDetails(ctx context.Context, req *pb.ASGetTableDetailsReq) (*pb.ASGetTableDetailsResp, error)
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 ¶
func (s *RulesService) UpdateTableMap(ctx context.Context, req *pb.ASUpdateTableMapReq) (*pb.ASUpdateTableMapResp, error)
Click to show internal directories.
Click to hide internal directories.