Documentation ¶
Index ¶
- Constants
- Variables
- func BatchOperation(label string, data []interface{}, handler BatchHandler) error
- func BatchQuery(label string, data []interface{}, handler BatchHandler) error
- func NewSqlDBTx(delegateTx *BaseTx) store.Tx
- func PlaceholdersN(size int) string
- func Retry(label string, handle func() error)
- func RetryTransaction(label string, handle func() error) error
- type BaseDB
- type BaseTx
- type BatchHandler
- type LeaderElectionStore
- type Order
- type Page
- type QueryHandler
- type StableOptStore
- func (cfr StableOptStore) ActiveConfigFileReleaseTx(tx store.Tx, release *model.ConfigFileRelease) error
- func (u StableOptStore) AddGroup(group *model.UserGroupDetail) error
- func (ins StableOptStore) AddInstance(instance *model.Instance) error
- func (ns StableOptStore) AddNamespace(namespace *model.Namespace) error
- func (ss StableOptStore) AddService(s *model.Service) error
- func (s StableOptStore) AddServiceContractInterfaces(contract *model.EnrichServiceContract) error
- func (s StableOptStore) AddStrategy(strategy *model.StrategyDetail) error
- func (u StableOptStore) AddUser(user *model.User) error
- func (s StableOptStore) AppendServiceContractInterfaces(contract *model.EnrichServiceContract) error
- func (cs StableOptStore) BatchAddClients(clients []*model.Client) error
- func (ins StableOptStore) BatchAddInstances(instances []*model.Instance) error
- func (ins StableOptStore) BatchAppendInstanceMetadata(requests []*store.InstanceMetadataRequest) error
- func (m StableOptStore) BatchCleanDeletedClients(timeout time.Duration, batchSize uint32) (uint32, error)
- func (m StableOptStore) BatchCleanDeletedInstances(timeout time.Duration, batchSize uint32) (uint32, error)
- func (cs StableOptStore) BatchDeleteClients(ids []string) error
- func (ins StableOptStore) BatchDeleteInstances(ids []interface{}) error
- func (ins StableOptStore) BatchGetInstanceIsolate(ids map[string]bool) (map[string]bool, error)
- func (ins StableOptStore) BatchRemoveInstanceMetadata(requests []*store.InstanceMetadataRequest) error
- func (ins StableOptStore) BatchSetInstanceHealthStatus(ids []interface{}, isolate int, revision string) error
- func (ins StableOptStore) BatchSetInstanceIsolate(ids []interface{}, isolate int, revision string) error
- func (rh StableOptStore) CleanConfigFileReleaseHistory(endTime time.Time, limit uint64) error
- func (cfr StableOptStore) CleanConfigFileReleasesTx(tx store.Tx, namespace, group, fileName string) error
- func (cfr StableOptStore) CleanDeletedConfigFileRelease(endTime time.Time, limit uint64) error
- func (g StableOptStore) CleanGrayResource(tx store.Tx, data *model.GrayResource) error
- func (ins StableOptStore) CleanInstance(instanceID string) error
- func (cf StableOptStore) CountConfigFileEachGroup() (map[string]map[string]int64, error)
- func (cfr StableOptStore) CountConfigFiles(namespace, group string) (uint64, error)
- func (fg StableOptStore) CountConfigGroups(namespace string) (uint64, error)
- func (cfr StableOptStore) CountConfigReleases(namespace, group string, onlyActive bool) (uint64, error)
- func (c StableOptStore) CreateCircuitBreakerRule(cbRule *model.CircuitBreakerRule) error
- func (cs StableOptStore) CreateClient(client *model.Client) error
- func (fg StableOptStore) CreateConfigFileGroup(fileGroup *model.ConfigFileGroup) (*model.ConfigFileGroup, error)
- func (rh StableOptStore) CreateConfigFileReleaseHistory(history *model.ConfigFileReleaseHistory) error
- func (cfr StableOptStore) CreateConfigFileReleaseTx(tx store.Tx, data *model.ConfigFileRelease) error
- func (cf StableOptStore) CreateConfigFileTemplate(template *model.ConfigFileTemplate) (*model.ConfigFileTemplate, error)
- func (cf StableOptStore) CreateConfigFileTx(tx store.Tx, file *model.ConfigFile) error
- func (f StableOptStore) CreateFaultDetectRule(fdRule *model.FaultDetectRule) error
- func (g StableOptStore) CreateGrayResourceTx(tx store.Tx, data *model.GrayResource) error
- func (rls StableOptStore) CreateRateLimit(limit *model.RateLimit) error
- func (rs StableOptStore) CreateRoutingConfig(conf *model.RoutingConfig) error
- func (r StableOptStore) CreateRoutingConfigV2(conf *model.RouterConfig) error
- func (r StableOptStore) CreateRoutingConfigV2Tx(tx store.Tx, conf *model.RouterConfig) error
- func (s StableOptStore) CreateServiceContract(contract *model.ServiceContract) error
- func (s *StableOptStore) CreateTransaction() (store.Transaction, error)
- func (c StableOptStore) DeleteCircuitBreakerRule(id string) error
- func (fg StableOptStore) DeleteConfigFileGroup(namespace, name string) error
- func (cfr StableOptStore) DeleteConfigFileReleaseTx(tx store.Tx, data *model.ConfigFileReleaseKey) error
- func (cf StableOptStore) DeleteConfigFileTx(tx store.Tx, namespace, group, name string) error
- func (f StableOptStore) DeleteFaultDetectRule(id string) error
- func (g StableOptStore) DeleteGrayResource(tx store.Tx, data *model.GrayResource) error
- func (u StableOptStore) DeleteGroup(group *model.UserGroupDetail) error
- func (ins StableOptStore) DeleteInstance(instanceID string) error
- func (rls StableOptStore) DeleteRateLimit(limit *model.RateLimit) error
- func (rs StableOptStore) DeleteRoutingConfig(serviceID string) error
- func (rs StableOptStore) DeleteRoutingConfigTx(tx store.Tx, serviceID string) error
- func (r StableOptStore) DeleteRoutingConfigV2(ruleID string) error
- func (ss StableOptStore) DeleteService(id, serviceName, namespaceName string) error
- func (ss StableOptStore) DeleteServiceAlias(name string, namespace string) error
- func (s StableOptStore) DeleteServiceContract(contract *model.ServiceContract) error
- func (s StableOptStore) DeleteServiceContractInterfaces(contract *model.EnrichServiceContract) error
- func (s StableOptStore) DeleteStrategy(id string) error
- func (u StableOptStore) DeleteUser(user *model.User) error
- func (s *StableOptStore) Destroy() error
- func (c StableOptStore) EnableCircuitBreakerRule(cbRule *model.CircuitBreakerRule) error
- func (rls StableOptStore) EnableRateLimit(limit *model.RateLimit) error
- func (r StableOptStore) EnableRouting(conf *model.RouterConfig) error
- func (l5 StableOptStore) GenNextL5Sid(layoutID uint32) (string, error)
- func (c StableOptStore) GetCircuitBreakerRules(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.CircuitBreakerRule, error)
- func (c StableOptStore) GetCircuitBreakerRulesForCache(mtime time.Time, firstUpdate bool) ([]*model.CircuitBreakerRule, error)
- func (cs StableOptStore) GetClientStat(clientID string) ([]*model.ClientStatStore, error)
- func (cf StableOptStore) GetConfigFile(namespace, group, name string) (*model.ConfigFile, error)
- func (cfr StableOptStore) GetConfigFileActiveRelease(file *model.ConfigFileKey) (*model.ConfigFileRelease, error)
- func (cfr StableOptStore) GetConfigFileActiveReleaseTx(tx store.Tx, file *model.ConfigFileKey) (*model.ConfigFileRelease, error)
- func (cfr StableOptStore) GetConfigFileBetaReleaseTx(tx store.Tx, file *model.ConfigFileKey) (*model.ConfigFileRelease, error)
- func (fg StableOptStore) GetConfigFileGroup(namespace, name string) (*model.ConfigFileGroup, error)
- func (cfr StableOptStore) GetConfigFileRelease(req *model.ConfigFileReleaseKey) (*model.ConfigFileRelease, error)
- func (cfr StableOptStore) GetConfigFileReleaseTx(tx store.Tx, req *model.ConfigFileReleaseKey) (*model.ConfigFileRelease, error)
- func (cf StableOptStore) GetConfigFileTemplate(name string) (*model.ConfigFileTemplate, error)
- func (cf StableOptStore) GetConfigFileTx(tx store.Tx, namespace, group, name string) (*model.ConfigFile, error)
- func (s StableOptStore) GetDefaultStrategyDetailByPrincipal(principalId string, principalType model.PrincipalType) (*model.StrategyDetail, error)
- func (ins StableOptStore) GetExpandInstances(filter, metaFilter map[string]string, offset uint32, limit uint32) (uint32, []*model.Instance, error)
- func (rls StableOptStore) GetExtendRateLimits(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.ExtendRateLimit, error)
- func (f StableOptStore) GetFaultDetectRules(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.FaultDetectRule, error)
- func (f StableOptStore) GetFaultDetectRulesForCache(mtime time.Time, firstUpdate bool) ([]*model.FaultDetectRule, error)
- func (u StableOptStore) GetGroup(groupId string) (*model.UserGroupDetail, error)
- func (u StableOptStore) GetGroupByName(name, owner string) (*model.UserGroup, error)
- func (u StableOptStore) GetGroups(filters map[string]string, offset uint32, limit uint32) (uint32, []*model.UserGroup, error)
- func (u StableOptStore) GetGroupsForCache(mtime time.Time, firstUpdate bool) ([]*model.UserGroupDetail, error)
- func (ins StableOptStore) GetInstance(instanceID string) (*model.Instance, error)
- func (ins StableOptStore) GetInstancesBrief(ids map[string]bool) (map[string]*model.Instance, error)
- func (ins StableOptStore) GetInstancesCount() (uint32, error)
- func (ins StableOptStore) GetInstancesCountTx(tx store.Tx) (uint32, error)
- func (ins StableOptStore) GetInstancesMainByService(serviceID, host string) ([]*model.Instance, error)
- func (l5 StableOptStore) GetL5Extend(serviceID string) (map[string]interface{}, error)
- func (cs StableOptStore) GetMoreClients(mtime time.Time, firstUpdate bool) (map[string]*model.Client, error)
- func (fg StableOptStore) GetMoreConfigGroup(firstUpdate bool, mtime time.Time) ([]*model.ConfigFileGroup, error)
- func (g StableOptStore) GetMoreGrayResouces(firstUpdate bool, modifyTime time.Time) ([]*model.GrayResource, error)
- func (ins StableOptStore) GetMoreInstances(tx store.Tx, mtime time.Time, firstUpdate, needMeta bool, serviceID []string) (map[string]*model.Instance, error)
- func (l5 StableOptStore) GetMoreL5Extend(mtime time.Time) (map[string]map[string]interface{}, error)
- func (l5 StableOptStore) GetMoreL5IPConfigs(flow uint32) ([]*model.IPConfig, error)
- func (l5 StableOptStore) GetMoreL5Policies(flow uint32) ([]*model.Policy, error)
- func (l5 StableOptStore) GetMoreL5Routes(flow uint32) ([]*model.Route, error)
- func (l5 StableOptStore) GetMoreL5Sections(flow uint32) ([]*model.Section, error)
- func (ns StableOptStore) GetMoreNamespaces(mtime time.Time) ([]*model.Namespace, error)
- func (cfr StableOptStore) GetMoreReleaseFile(firstUpdate bool, modifyTime time.Time) ([]*model.ConfigFileRelease, error)
- func (s StableOptStore) GetMoreServiceContracts(firstUpdate bool, mtime time.Time) ([]*model.EnrichServiceContract, error)
- func (ss StableOptStore) GetMoreServices(mtime time.Time, firstUpdate, disableBusiness, needMeta bool) (map[string]*model.Service, error)
- func (ns StableOptStore) GetNamespace(name string) (*model.Namespace, error)
- func (ns StableOptStore) GetNamespaces(filter map[string][]string, offset, limit int) ([]*model.Namespace, uint32, error)
- func (rls StableOptStore) GetRateLimitWithID(id string) (*model.RateLimit, error)
- func (rls StableOptStore) GetRateLimitsForCache(mtime time.Time, firstUpdate bool) ([]*model.RateLimit, error)
- func (r StableOptStore) GetRoutingConfigV2WithID(ruleID string) (*model.RouterConfig, error)
- func (r StableOptStore) GetRoutingConfigV2WithIDTx(tx store.Tx, ruleID string) (*model.RouterConfig, error)
- func (rs StableOptStore) GetRoutingConfigWithID(id string) (*model.RoutingConfig, error)
- func (rs StableOptStore) GetRoutingConfigWithService(name string, namespace string) (*model.RoutingConfig, error)
- func (rs StableOptStore) GetRoutingConfigs(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.ExtendRoutingConfig, error)
- func (rs StableOptStore) GetRoutingConfigsForCache(mtime time.Time, firstUpdate bool) ([]*model.RoutingConfig, error)
- func (r StableOptStore) GetRoutingConfigsV2ForCache(mtime time.Time, firstUpdate bool) ([]*model.RouterConfig, error)
- func (ss StableOptStore) GetService(name string, namespace string) (*model.Service, error)
- func (ss StableOptStore) GetServiceAliases(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.ServiceAlias, error)
- func (ss StableOptStore) GetServiceByID(id string) (*model.Service, error)
- func (s StableOptStore) GetServiceContract(id string) (data *model.EnrichServiceContract, err error)
- func (ss StableOptStore) GetServices(serviceFilters, serviceMetas map[string]string, ...) (uint32, []*model.Service, error)
- func (ss StableOptStore) GetServicesBatch(services []*model.Service) ([]*model.Service, error)
- func (ss StableOptStore) GetServicesCount() (uint32, error)
- func (ss StableOptStore) GetSourceServiceToken(name string, namespace string) (*model.Service, error)
- func (s StableOptStore) GetStrategies(filters map[string]string, offset uint32, limit uint32) (uint32, []*model.StrategyDetail, error)
- func (s StableOptStore) GetStrategyDetail(id string) (*model.StrategyDetail, error)
- func (s StableOptStore) GetStrategyDetailsForCache(mtime time.Time, firstUpdate bool) ([]*model.StrategyDetail, error)
- func (s StableOptStore) GetStrategyResources(principalId string, principalRole model.PrincipalType) ([]model.StrategyResource, error)
- func (u StableOptStore) GetSubCount(user *model.User) (uint32, error)
- func (ss StableOptStore) GetSystemServices() ([]*model.Service, error)
- func (m StableOptStore) GetUnHealthyInstances(timeout time.Duration, limit uint32) ([]string, error)
- func (t StableOptStore) GetUnixSecond(maxWait time.Duration) (int64, error)
- func (u StableOptStore) GetUser(id string) (*model.User, error)
- func (u StableOptStore) GetUserByIds(ids []string) ([]*model.User, error)
- func (u StableOptStore) GetUserByName(name, ownerId string) (*model.User, error)
- func (u StableOptStore) GetUsers(filters map[string]string, offset uint32, limit uint32) (uint32, []*model.User, error)
- func (u StableOptStore) GetUsersForCache(mtime time.Time, firstUpdate bool) ([]*model.User, error)
- func (c StableOptStore) HasCircuitBreakerRule(id string) (bool, error)
- func (c StableOptStore) HasCircuitBreakerRuleByName(name string, namespace string) (bool, error)
- func (c StableOptStore) HasCircuitBreakerRuleByNameExcludeId(name string, namespace string, id string) (bool, error)
- func (f StableOptStore) HasFaultDetectRule(id string) (bool, error)
- func (f StableOptStore) HasFaultDetectRuleByName(name string, namespace string) (bool, error)
- func (f StableOptStore) HasFaultDetectRuleByNameExcludeId(name string, namespace string, id string) (bool, error)
- func (cfr StableOptStore) InactiveConfigFileReleaseTx(tx store.Tx, release *model.ConfigFileRelease) error
- func (s *StableOptStore) Initialize(conf *store.Config) error
- func (m StableOptStore) IsLeader(key string) bool
- func (m StableOptStore) ListLeaderElections() ([]*model.LeaderElection, error)
- func (cf StableOptStore) LockConfigFile(tx store.Tx, file *model.ConfigFileKey) (*model.ConfigFile, error)
- func (s StableOptStore) LooseAddStrategyResources(resources []model.StrategyResource) error
- func (s *StableOptStore) Name() string
- func (cf StableOptStore) QueryAllConfigFileTemplates() ([]*model.ConfigFileTemplate, error)
- func (rh StableOptStore) QueryConfigFileReleaseHistories(filter map[string]string, offset, limit uint32) (uint32, []*model.ConfigFileReleaseHistory, error)
- func (cf StableOptStore) QueryConfigFiles(filter map[string]string, offset, limit uint32) (uint32, []*model.ConfigFile, error)
- func (m StableOptStore) ReleaseLeaderElection(key string) error
- func (s StableOptStore) RemoveStrategyResources(resources []model.StrategyResource) error
- func (ins StableOptStore) SetInstanceHealthStatus(instanceID string, flag int, revision string) error
- func (l5 StableOptStore) SetL5Extend(serviceID string, meta map[string]interface{}) (map[string]interface{}, error)
- func (m StableOptStore) StartLeaderElection(key string) error
- func (s *StableOptStore) StartReadTx() (store.Tx, error)
- func (s *StableOptStore) StartTx() (store.Tx, error)
- func (m StableOptStore) StopLeaderElections()
- func (c StableOptStore) UpdateCircuitBreakerRule(cbRule *model.CircuitBreakerRule) error
- func (cs StableOptStore) UpdateClient(client *model.Client) error
- func (fg StableOptStore) UpdateConfigFileGroup(fileGroup *model.ConfigFileGroup) error
- func (cf StableOptStore) UpdateConfigFileTx(tx store.Tx, file *model.ConfigFile) error
- func (f StableOptStore) UpdateFaultDetectRule(fdRule *model.FaultDetectRule) error
- func (u StableOptStore) UpdateGroup(group *model.ModifyUserGroup) error
- func (ins StableOptStore) UpdateInstance(instance *model.Instance) error
- func (ns StableOptStore) UpdateNamespace(namespace *model.Namespace) error
- func (ns StableOptStore) UpdateNamespaceToken(name string, token string) error
- func (rls StableOptStore) UpdateRateLimit(limit *model.RateLimit) error
- func (rs StableOptStore) UpdateRoutingConfig(conf *model.RoutingConfig) error
- func (r StableOptStore) UpdateRoutingConfigV2(conf *model.RouterConfig) error
- func (r StableOptStore) UpdateRoutingConfigV2Tx(tx store.Tx, conf *model.RouterConfig) error
- func (ss StableOptStore) UpdateService(service *model.Service, needUpdateOwner bool) error
- func (ss StableOptStore) UpdateServiceAlias(alias *model.Service, needUpdateOwner bool) error
- func (s StableOptStore) UpdateServiceContract(contract *model.ServiceContract) error
- func (ss StableOptStore) UpdateServiceToken(id string, token string, revision string) error
- func (s StableOptStore) UpdateStrategy(strategy *model.ModifyStrategyDetail) error
- func (u StableOptStore) UpdateUser(user *model.User) error
- type Tx
Constants ¶
const ( TickTime = 2 LeaseTime = 10 )
const ( // SystemNamespace system namespace SystemNamespace = "Polaris" // STORENAME database storage name STORENAME = "mysqlOptStore" // DefaultConnMaxLifetime default maximum connection lifetime DefaultConnMaxLifetime = 60 * 30 // 默认是30分钟 )
const ( // IDAttribute is the name of the attribute that stores the ID of the object. IDAttribute string = "id" // NameAttribute will be used as the name of the attribute that stores the name of the object. NameAttribute string = "name" // FlagAttribute will be used as the name of the attribute that stores the flag of the object. FlagAttribute string = "flag" // GroupIDAttribute will be used as the name of the attribute that stores the group ID of the object. GroupIDAttribute string = "group_id" )
const ( // OwnerAttribute OwnerAttribute string = "owner" // And And string = " and" )
Variables ¶
var ( RuleFilters map[string]string = map[string]string{ "res_id": "ar.res_id", "res_type": "ar.res_type", "default": "ag.default", "owner": "ag.owner", "name": "ag.name", "principal_id": "ap.principal_id", "principal_type": "ap.principal_role", } RuleNeedLikeFilters map[string]struct{} = map[string]struct{}{ "name": {}, } )
var (
ErrTxIsNil = errors.New("tx is nil")
)
Functions ¶
func BatchOperation ¶
func BatchOperation(label string, data []interface{}, handler BatchHandler) error
BatchOperation 批量操作 @note 每次最多操作100个
func BatchQuery ¶
func BatchQuery(label string, data []interface{}, handler BatchHandler) error
BatchQuery 批量查询数据的对外接口 每次最多查询200个
func NewSqlDBTx ¶
func RetryTransaction ¶
RetryTransaction 事务重试
Types ¶
type BaseDB ¶
BaseDB 对sql.DB的封装
func NewBaseDB ¶
func NewBaseDB(cfg *dbConfig, parsePwd plugin.ParsePassword) (*BaseDB, error)
NewBaseDB 新建一个BaseDB
type LeaderElectionStore ¶
type LeaderElectionStore interface { // CreateLeaderElection CreateLeaderElection(key string) error // GetVersion get current version GetVersion(key string) (int64, error) // CompareAndSwapVersion cas version CompareAndSwapVersion(key string, curVersion int64, newVersion int64, leader string) (bool, error) // CheckMtimeExpired check mtime expired CheckMtimeExpired(key string, leaseTime int32) (string, bool, error) // ListLeaderElections list all leaderelection ListLeaderElections() ([]*model.LeaderElection, error) }
LeaderElectionStore store inteface
type QueryHandler ¶
QueryHandler is the interface that wraps the basic Query method.
type StableOptStore ¶
type StableOptStore struct {
// contains filtered or unexported fields
}
StableOptStore 实现了Store接口
func (StableOptStore) ActiveConfigFileReleaseTx ¶
func (cfr StableOptStore) ActiveConfigFileReleaseTx(tx store.Tx, release *model.ConfigFileRelease) error
ActiveConfigFileReleaseTx
func (StableOptStore) AddGroup ¶
func (u StableOptStore) AddGroup(group *model.UserGroupDetail) error
AddGroup 创建一个用户组
func (StableOptStore) AddInstance ¶
AddInstance 添加实例
func (StableOptStore) AddNamespace ¶
AddNamespace 添加命名空间
func (StableOptStore) AddService ¶
AddService 增加服务
func (StableOptStore) AddServiceContractInterfaces ¶
func (s StableOptStore) AddServiceContractInterfaces(contract *model.EnrichServiceContract) error
AddServiceContractInterfaces 创建服务契约API接口
func (StableOptStore) AddStrategy ¶
func (s StableOptStore) AddStrategy(strategy *model.StrategyDetail) error
func (StableOptStore) AppendServiceContractInterfaces ¶
func (s StableOptStore) AppendServiceContractInterfaces(contract *model.EnrichServiceContract) error
AppendServiceContractInterfaces 追加服务契约API接口
func (StableOptStore) BatchAddClients ¶
BatchAddClients 增加多个实例
func (StableOptStore) BatchAddInstances ¶
BatchAddInstances 批量增加实例
func (StableOptStore) BatchAppendInstanceMetadata ¶
func (ins StableOptStore) BatchAppendInstanceMetadata(requests []*store.InstanceMetadataRequest) error
BatchAppendInstanceMetadata 追加实例 metadata
func (StableOptStore) BatchCleanDeletedClients ¶
func (m StableOptStore) BatchCleanDeletedClients(timeout time.Duration, batchSize uint32) (uint32, error)
BatchCleanDeletedClients batch clean soft deleted clients
func (StableOptStore) BatchCleanDeletedInstances ¶
func (m StableOptStore) BatchCleanDeletedInstances(timeout time.Duration, batchSize uint32) (uint32, error)
BatchCleanDeletedInstances batch clean soft deleted instances
func (StableOptStore) BatchDeleteClients ¶
BatchDeleteClients 批量删除实例,flag=1
func (StableOptStore) BatchDeleteInstances ¶
func (ins StableOptStore) BatchDeleteInstances(ids []interface{}) error
BatchDeleteInstances 批量删除实例
func (StableOptStore) BatchGetInstanceIsolate ¶
BatchGetInstanceIsolate 检查实例是否存在
func (StableOptStore) BatchRemoveInstanceMetadata ¶
func (ins StableOptStore) BatchRemoveInstanceMetadata(requests []*store.InstanceMetadataRequest) error
BatchRemoveInstanceMetadata 删除实例指定的 metadata
func (StableOptStore) BatchSetInstanceHealthStatus ¶
func (ins StableOptStore) BatchSetInstanceHealthStatus(ids []interface{}, isolate int, revision string) error
BatchSetInstanceHealthStatus 批量设置健康状态
func (StableOptStore) BatchSetInstanceIsolate ¶
func (ins StableOptStore) BatchSetInstanceIsolate(ids []interface{}, isolate int, revision string) error
BatchSetInstanceIsolate 批量设置实例隔离状态
func (StableOptStore) CleanConfigFileReleaseHistory ¶
CleanConfigFileReleaseHistory 清理配置发布历史
func (StableOptStore) CleanConfigFileReleasesTx ¶
func (cfr StableOptStore) CleanConfigFileReleasesTx(tx store.Tx, namespace, group, fileName string) error
CleanConfigFileReleasesTx
func (StableOptStore) CleanDeletedConfigFileRelease ¶
CleanDeletedConfigFileRelease 清理配置发布历史
func (StableOptStore) CleanGrayResource ¶
func (g StableOptStore) CleanGrayResource(tx store.Tx, data *model.GrayResource) error
func (StableOptStore) CleanInstance ¶
CleanInstance 清理数据
func (StableOptStore) CountConfigFileEachGroup ¶
CountConfigFileEachGroup
func (StableOptStore) CountConfigFiles ¶
CountConfigFiles 获取一个配置文件组下的文件数量
func (StableOptStore) CountConfigGroups ¶
CountConfigGroups
func (StableOptStore) CountConfigReleases ¶
func (cfr StableOptStore) CountConfigReleases(namespace, group string, onlyActive bool) (uint64, error)
CountConfigReleases 获取一个配置文件组下的文件数量
func (StableOptStore) CreateCircuitBreakerRule ¶
func (c StableOptStore) CreateCircuitBreakerRule(cbRule *model.CircuitBreakerRule) error
func (StableOptStore) CreateClient ¶
CreateClient insert the client info
func (StableOptStore) CreateConfigFileGroup ¶
func (fg StableOptStore) CreateConfigFileGroup( fileGroup *model.ConfigFileGroup) (*model.ConfigFileGroup, error)
CreateConfigFileGroup 创建配置文件组
func (StableOptStore) CreateConfigFileReleaseHistory ¶
func (rh StableOptStore) CreateConfigFileReleaseHistory( history *model.ConfigFileReleaseHistory) error
CreateConfigFileReleaseHistory 创建配置文件发布历史记录
func (StableOptStore) CreateConfigFileReleaseTx ¶
func (cfr StableOptStore) CreateConfigFileReleaseTx(tx store.Tx, data *model.ConfigFileRelease) error
CreateConfigFileRelease 新建配置文件发布
func (StableOptStore) CreateConfigFileTemplate ¶
func (cf StableOptStore) CreateConfigFileTemplate( template *model.ConfigFileTemplate) (*model.ConfigFileTemplate, error)
CreateConfigFileTemplate create config file template
func (StableOptStore) CreateConfigFileTx ¶
func (cf StableOptStore) CreateConfigFileTx(tx store.Tx, file *model.ConfigFile) error
CreateConfigFile 创建配置文件
func (StableOptStore) CreateFaultDetectRule ¶
func (f StableOptStore) CreateFaultDetectRule(fdRule *model.FaultDetectRule) error
CreateFaultDetectRule create fault detect rule
func (StableOptStore) CreateGrayResourceTx ¶
func (g StableOptStore) CreateGrayResourceTx(tx store.Tx, data *model.GrayResource) error
CreateGrayResourceTx 创建灰度资源
func (StableOptStore) CreateRateLimit ¶
CreateRateLimit 新建限流规则
func (StableOptStore) CreateRoutingConfig ¶
func (rs StableOptStore) CreateRoutingConfig(conf *model.RoutingConfig) error
CreateRoutingConfig 新建RoutingConfig
func (StableOptStore) CreateRoutingConfigV2 ¶
func (r StableOptStore) CreateRoutingConfigV2(conf *model.RouterConfig) error
CreateRoutingConfigV2 Add a new routing configuration
func (StableOptStore) CreateRoutingConfigV2Tx ¶
func (r StableOptStore) CreateRoutingConfigV2Tx(tx store.Tx, conf *model.RouterConfig) error
func (StableOptStore) CreateServiceContract ¶
func (s StableOptStore) CreateServiceContract(contract *model.ServiceContract) error
CreateServiceContract 创建服务契约
func (*StableOptStore) CreateTransaction ¶
func (s *StableOptStore) CreateTransaction() (store.Transaction, error)
CreateTransaction 创建一个事务
func (StableOptStore) DeleteCircuitBreakerRule ¶
DeleteCircuitBreakerRule 删除熔断规则
func (StableOptStore) DeleteConfigFileGroup ¶
DeleteConfigFileGroup 删除配置文件组
func (StableOptStore) DeleteConfigFileReleaseTx ¶
func (cfr StableOptStore) DeleteConfigFileReleaseTx(tx store.Tx, data *model.ConfigFileReleaseKey) error
DeleteConfigFileRelease
func (StableOptStore) DeleteConfigFileTx ¶
DeleteConfigFileTx 删除配置文件
func (StableOptStore) DeleteFaultDetectRule ¶
DeleteFaultDetectRule delete fault detect rule
func (StableOptStore) DeleteGrayResource ¶
func (g StableOptStore) DeleteGrayResource(tx store.Tx, data *model.GrayResource) error
DeleteGrayResource 删除灰度资源
func (StableOptStore) DeleteGroup ¶
func (u StableOptStore) DeleteGroup(group *model.UserGroupDetail) error
DeleteGroup 删除用户组
func (StableOptStore) DeleteInstance ¶
DeleteInstance 删除一个实例,删除实例实际上是把flag置为1
func (StableOptStore) DeleteRateLimit ¶
DeleteRateLimit 删除限流规则
func (StableOptStore) DeleteRoutingConfig ¶
DeleteRoutingConfig 删除
func (StableOptStore) DeleteRoutingConfigTx ¶
DeleteRoutingConfigTx 删除
func (StableOptStore) DeleteRoutingConfigV2 ¶
DeleteRoutingConfigV2 Delete a routing configuration
func (StableOptStore) DeleteService ¶
DeleteService 删除服务
func (StableOptStore) DeleteServiceAlias ¶
DeleteServiceAlias 删除服务别名
func (StableOptStore) DeleteServiceContract ¶
func (s StableOptStore) DeleteServiceContract(contract *model.ServiceContract) error
DeleteServiceContract 删除服务契约 删除该版本的全部数据
func (StableOptStore) DeleteServiceContractInterfaces ¶
func (s StableOptStore) DeleteServiceContractInterfaces(contract *model.EnrichServiceContract) error
DeleteServiceContractInterfaces 删除服务契约API接口
func (StableOptStore) DeleteStrategy ¶
func (StableOptStore) DeleteUser ¶
DeleteUser delete user by user id
func (StableOptStore) EnableCircuitBreakerRule ¶
func (c StableOptStore) EnableCircuitBreakerRule(cbRule *model.CircuitBreakerRule) error
EnableCircuitBreakerRule enable circuitbreaker rule
func (StableOptStore) EnableRateLimit ¶
EnableRateLimit 启用限流规则
func (StableOptStore) EnableRouting ¶
func (r StableOptStore) EnableRouting(conf *model.RouterConfig) error
EnableRateLimit Enable current limit rules
func (StableOptStore) GenNextL5Sid ¶
GenNextL5Sid 获取下一个sid
func (StableOptStore) GetCircuitBreakerRules ¶
func (StableOptStore) GetCircuitBreakerRulesForCache ¶
func (c StableOptStore) GetCircuitBreakerRulesForCache( mtime time.Time, firstUpdate bool) ([]*model.CircuitBreakerRule, error)
GetCircuitBreakerRulesForCache list circuitbreaker rules by query
func (StableOptStore) GetClientStat ¶
func (cs StableOptStore) GetClientStat(clientID string) ([]*model.ClientStatStore, error)
func (StableOptStore) GetConfigFile ¶
func (cf StableOptStore) GetConfigFile(namespace, group, name string) (*model.ConfigFile, error)
GetConfigFile 获取配置文件
func (StableOptStore) GetConfigFileActiveRelease ¶
func (cfr StableOptStore) GetConfigFileActiveRelease(file *model.ConfigFileKey) ( *model.ConfigFileRelease, error)
GetConfigFileActiveRelease .
func (StableOptStore) GetConfigFileActiveReleaseTx ¶
func (cfr StableOptStore) GetConfigFileActiveReleaseTx(tx store.Tx, file *model.ConfigFileKey) (*model.ConfigFileRelease, error)
GetConfigFileActiveReleaseTx .
func (StableOptStore) GetConfigFileBetaReleaseTx ¶
func (cfr StableOptStore) GetConfigFileBetaReleaseTx(tx store.Tx, file *model.ConfigFileKey) (*model.ConfigFileRelease, error)
GetConfigFileBetaReleaseTx .
func (StableOptStore) GetConfigFileGroup ¶
func (fg StableOptStore) GetConfigFileGroup(namespace, name string) (*model.ConfigFileGroup, error)
GetConfigFileGroup 获取配置文件组
func (StableOptStore) GetConfigFileRelease ¶
func (cfr StableOptStore) GetConfigFileRelease(req *model.ConfigFileReleaseKey) ( *model.ConfigFileRelease, error)
GetConfigFileRelease 获取配置文件发布,只返回 flag=0 的记录
func (StableOptStore) GetConfigFileReleaseTx ¶
func (cfr StableOptStore) GetConfigFileReleaseTx(tx store.Tx, req *model.ConfigFileReleaseKey) (*model.ConfigFileRelease, error)
GetConfigFileReleaseTx 在已开启的事务中获取配置文件发布内容,只获取 flag=0 的记录
func (StableOptStore) GetConfigFileTemplate ¶
func (cf StableOptStore) GetConfigFileTemplate(name string) (*model.ConfigFileTemplate, error)
GetConfigFileTemplate get config file template by name
func (StableOptStore) GetConfigFileTx ¶
func (cf StableOptStore) GetConfigFileTx(tx store.Tx, namespace, group, name string) (*model.ConfigFile, error)
GetConfigFile 获取配置文件
func (StableOptStore) GetDefaultStrategyDetailByPrincipal ¶
func (s StableOptStore) GetDefaultStrategyDetailByPrincipal(principalId string, principalType model.PrincipalType) (*model.StrategyDetail, error)
GetDefaultStrategyDetailByPrincipal 获取默认策略
func (StableOptStore) GetExpandInstances ¶
func (ins StableOptStore) GetExpandInstances(filter, metaFilter map[string]string, offset uint32, limit uint32) (uint32, []*model.Instance, error)
GetExpandInstances 根据过滤条件查看对应服务实例及数目
func (StableOptStore) GetExtendRateLimits ¶
func (rls StableOptStore) GetExtendRateLimits( filter map[string]string, offset uint32, limit uint32) (uint32, []*model.ExtendRateLimit, error)
GetExtendRateLimits 根据过滤条件获取限流规则及数目
func (StableOptStore) GetFaultDetectRules ¶
func (f StableOptStore) GetFaultDetectRules( filter map[string]string, offset uint32, limit uint32) (uint32, []*model.FaultDetectRule, error)
GetFaultDetectRules get all fault detect rules by query and limit
func (StableOptStore) GetFaultDetectRulesForCache ¶
func (f StableOptStore) GetFaultDetectRulesForCache( mtime time.Time, firstUpdate bool) ([]*model.FaultDetectRule, error)
GetFaultDetectRulesForCache get increment circuitbreaker rules
func (StableOptStore) GetGroup ¶
func (u StableOptStore) GetGroup(groupId string) (*model.UserGroupDetail, error)
GetGroup 根据用户组ID获取用户组
func (StableOptStore) GetGroupByName ¶
GetGroupByName 根据 owner、name 获取用户组
func (StableOptStore) GetGroups ¶
func (u StableOptStore) GetGroups(filters map[string]string, offset uint32, limit uint32) (uint32, []*model.UserGroup, error)
GetGroups 根据不同的请求情况进行不同的用户组列表查询
func (StableOptStore) GetGroupsForCache ¶
func (u StableOptStore) GetGroupsForCache(mtime time.Time, firstUpdate bool) ([]*model.UserGroupDetail, error)
GetGroupsForCache .
func (StableOptStore) GetInstance ¶
GetInstance 获取单个实例详情,只返回有效的数据
func (StableOptStore) GetInstancesBrief ¶
func (ins StableOptStore) GetInstancesBrief(ids map[string]bool) (map[string]*model.Instance, error)
GetInstancesBrief 批量获取实例的serviceID
func (StableOptStore) GetInstancesCount ¶
GetInstancesCount 获取有效的实例总数
func (StableOptStore) GetInstancesCountTx ¶
GetInstancesCountTx .
func (StableOptStore) GetInstancesMainByService ¶
func (ins StableOptStore) GetInstancesMainByService(serviceID, host string) ([]*model.Instance, error)
GetInstancesMainByService 根据服务和host获取实例 @note 不包括metadata
func (StableOptStore) GetL5Extend ¶
GetL5Extend 获取L5扩展数据
func (StableOptStore) GetMoreClients ¶
func (cs StableOptStore) GetMoreClients(mtime time.Time, firstUpdate bool) (map[string]*model.Client, error)
GetMoreClients 根据mtime获取增量clients,返回所有store的变更信息
func (StableOptStore) GetMoreConfigGroup ¶
func (StableOptStore) GetMoreGrayResouces ¶
func (g StableOptStore) GetMoreGrayResouces(firstUpdate bool, modifyTime time.Time) ([]*model.GrayResource, error)
GetMoreGrayResouces 获取最近更新的灰度资源, 此方法用于 cache 增量更新,需要注意 modifyTime 应为数据库时间戳
func (StableOptStore) GetMoreInstances ¶
func (ins StableOptStore) GetMoreInstances(tx store.Tx, mtime time.Time, firstUpdate, needMeta bool, serviceID []string) (map[string]*model.Instance, error)
GetMoreInstances 根据mtime获取增量修改数据 这里会返回所有的数据的,包括valid=false的数据 对于首次拉取,firstUpdate=true,只会拉取flag!=1的数据
func (StableOptStore) GetMoreL5Extend ¶
func (l5 StableOptStore) GetMoreL5Extend(mtime time.Time) (map[string]map[string]interface{}, error)
GetMoreL5Extend 获取更多的增量数据
func (StableOptStore) GetMoreL5IPConfigs ¶
GetMoreL5IPConfigs 获取更多的L5 IPConfig信息
func (StableOptStore) GetMoreL5Policies ¶
GetMoreL5Policies 获取更多的L5 Policy信息
func (StableOptStore) GetMoreL5Routes ¶
GetMoreL5Routes 获取更多的L5 Route信息
func (StableOptStore) GetMoreL5Sections ¶
GetMoreL5Sections 获取更多的L5 Section信息
func (StableOptStore) GetMoreNamespaces ¶
GetMoreNamespaces 根据mtime获取命名空间
func (StableOptStore) GetMoreReleaseFile ¶
func (cfr StableOptStore) GetMoreReleaseFile(firstUpdate bool, modifyTime time.Time) ([]*model.ConfigFileRelease, error)
GetMoreReleaseFile 获取最近更新的配置文件发布, 此方法用于 cache 增量更新,需要注意 modifyTime 应为数据库时间戳
func (StableOptStore) GetMoreServiceContracts ¶
func (s StableOptStore) GetMoreServiceContracts(firstUpdate bool, mtime time.Time) ( []*model.EnrichServiceContract, error)
GetMoreServiceContracts 查询服务契约数据
func (StableOptStore) GetMoreServices ¶
func (ss StableOptStore) GetMoreServices(mtime time.Time, firstUpdate, disableBusiness, needMeta bool) ( map[string]*model.Service, error)
GetMoreServices 根据modify_time获取增量数据
func (StableOptStore) GetNamespace ¶
GetNamespace 根据名字获取命名空间详情,只返回有效的
func (StableOptStore) GetNamespaces ¶
func (ns StableOptStore) GetNamespaces(filter map[string][]string, offset, limit int) ( []*model.Namespace, uint32, error)
GetNamespaces 根据过滤条件查询命名空间及数目
func (StableOptStore) GetRateLimitWithID ¶
GetRateLimitWithID 根据限流规则ID获取限流规则
func (StableOptStore) GetRateLimitsForCache ¶
func (rls StableOptStore) GetRateLimitsForCache(mtime time.Time, firstUpdate bool) ([]*model.RateLimit, error)
GetRateLimitsForCache 根据修改时间拉取增量限流规则及最新版本号
func (StableOptStore) GetRoutingConfigV2WithID ¶
func (r StableOptStore) GetRoutingConfigV2WithID(ruleID string) (*model.RouterConfig, error)
GetRoutingConfigV2WithID Pull the routing configuration according to the rules ID
func (StableOptStore) GetRoutingConfigV2WithIDTx ¶
func (r StableOptStore) GetRoutingConfigV2WithIDTx(tx store.Tx, ruleID string) (*model.RouterConfig, error)
GetRoutingConfigV2WithIDTx Pull the routing configuration according to the rules ID
func (StableOptStore) GetRoutingConfigWithID ¶
func (rs StableOptStore) GetRoutingConfigWithID(id string) (*model.RoutingConfig, error)
GetRoutingConfigWithID 根据服务ID获取对应的配置
func (StableOptStore) GetRoutingConfigWithService ¶
func (rs StableOptStore) GetRoutingConfigWithService( name string, namespace string) (*model.RoutingConfig, error)
GetRoutingConfigWithService 根据服务名+namespace获取对应的配置
func (StableOptStore) GetRoutingConfigs ¶
func (rs StableOptStore) GetRoutingConfigs(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.ExtendRoutingConfig, error)
GetRoutingConfigs 获取路由配置列表
func (StableOptStore) GetRoutingConfigsForCache ¶
func (rs StableOptStore) GetRoutingConfigsForCache( mtime time.Time, firstUpdate bool) ([]*model.RoutingConfig, error)
GetRoutingConfigsForCache 缓存增量拉取
func (StableOptStore) GetRoutingConfigsV2ForCache ¶
func (r StableOptStore) GetRoutingConfigsV2ForCache( mtime time.Time, firstUpdate bool) ([]*model.RouterConfig, error)
GetRoutingConfigsV2ForCache Pull the incremental routing configuration information through mtime
func (StableOptStore) GetService ¶
GetService 获取服务详情,只返回有效的数据
func (StableOptStore) GetServiceAliases ¶
func (ss StableOptStore) GetServiceAliases(filter map[string]string, offset uint32, limit uint32) (uint32, []*model.ServiceAlias, error)
GetServiceAliases 获取服务别名列表
func (StableOptStore) GetServiceByID ¶
GetServiceByID 根据服务ID查询服务详情
func (StableOptStore) GetServiceContract ¶
func (s StableOptStore) GetServiceContract(id string) (data *model.EnrichServiceContract, err error)
GetServiceContract 通过ID查询服务契约数据
func (StableOptStore) GetServices ¶
func (ss StableOptStore) GetServices(serviceFilters, serviceMetas map[string]string, instanceFilters *store.InstanceArgs, offset, limit uint32) (uint32, []*model.Service, error)
GetServices 根据相关条件查询对应服务及数目,不包括别名
func (StableOptStore) GetServicesBatch ¶
GetServicesBatch 查询多个服务的id
func (StableOptStore) GetServicesCount ¶
GetServicesCount 获取所有服务总数
func (StableOptStore) GetSourceServiceToken ¶
func (ss StableOptStore) GetSourceServiceToken(name string, namespace string) (*model.Service, error)
GetSourceServiceToken 获取只获取服务token 返回服务ID,服务token
func (StableOptStore) GetStrategies ¶
func (s StableOptStore) GetStrategies(filters map[string]string, offset uint32, limit uint32) (uint32, []*model.StrategyDetail, error)
GetStrategies 获取策略列表
func (StableOptStore) GetStrategyDetail ¶
func (s StableOptStore) GetStrategyDetail(id string) (*model.StrategyDetail, error)
GetStrategyDetail 获取策略详情
func (StableOptStore) GetStrategyDetailsForCache ¶
func (StableOptStore) GetStrategyResources ¶
func (s StableOptStore) GetStrategyResources(principalId string, principalRole model.PrincipalType) ([]model.StrategyResource, error)
GetStrategyResources 获取对应 principal 能操作的所有资源
func (StableOptStore) GetSubCount ¶
GetSubCount get user's sub count
func (StableOptStore) GetSystemServices ¶
GetSystemServices 获取系统服务
func (StableOptStore) GetUnHealthyInstances ¶
func (StableOptStore) GetUnixSecond ¶
GetUnixSecond 获取当前时间,单位秒
func (StableOptStore) GetUserByIds ¶
GetUserByIds Get user list data according to user ID
func (StableOptStore) GetUserByName ¶
GetUserByName 根据用户名、owner 获取用户
func (StableOptStore) GetUsers ¶
func (u StableOptStore) GetUsers(filters map[string]string, offset uint32, limit uint32) (uint32, []*model.User, error)
GetUsers Query user list information Case 1. From the user's perspective, normal query conditions Case 2. From the perspective of the user group, query is the list of users involved under a user group.
func (StableOptStore) GetUsersForCache ¶
GetUsersForCache Get user information, mainly for cache
func (StableOptStore) HasCircuitBreakerRule ¶
HasCircuitBreakerRule check circuitbreaker rule exists
func (StableOptStore) HasCircuitBreakerRuleByName ¶
HasCircuitBreakerRuleByName check circuitbreaker rule exists by name
func (StableOptStore) HasCircuitBreakerRuleByNameExcludeId ¶
func (c StableOptStore) HasCircuitBreakerRuleByNameExcludeId( name string, namespace string, id string) (bool, error)
HasCircuitBreakerRuleByNameExcludeId check circuitbreaker rule exists by name exclude id
func (StableOptStore) HasFaultDetectRule ¶
HasFaultDetectRule check fault detect rule exists
func (StableOptStore) HasFaultDetectRuleByName ¶
HasFaultDetectRuleByName check fault detect rule exists by name
func (StableOptStore) HasFaultDetectRuleByNameExcludeId ¶
func (f StableOptStore) HasFaultDetectRuleByNameExcludeId( name string, namespace string, id string) (bool, error)
HasFaultDetectRuleByNameExcludeId check fault detect rule exists by name not this id
func (StableOptStore) InactiveConfigFileReleaseTx ¶
func (cfr StableOptStore) InactiveConfigFileReleaseTx(tx store.Tx, release *model.ConfigFileRelease) error
func (*StableOptStore) Initialize ¶
func (s *StableOptStore) Initialize(conf *store.Config) error
Initialize 初始化函数
func (StableOptStore) ListLeaderElections ¶
func (m StableOptStore) ListLeaderElections() ([]*model.LeaderElection, error)
ListLeaderElections list election records
func (StableOptStore) LockConfigFile ¶
func (cf StableOptStore) LockConfigFile(tx store.Tx, file *model.ConfigFileKey) (*model.ConfigFile, error)
LockConfigFile 加锁配置文件
func (StableOptStore) LooseAddStrategyResources ¶
func (s StableOptStore) LooseAddStrategyResources(resources []model.StrategyResource) error
LooseAddStrategyResources loose add strategy resources
func (StableOptStore) QueryAllConfigFileTemplates ¶
func (cf StableOptStore) QueryAllConfigFileTemplates() ([]*model.ConfigFileTemplate, error)
QueryAllConfigFileTemplates query all config file templates
func (StableOptStore) QueryConfigFileReleaseHistories ¶
func (rh StableOptStore) QueryConfigFileReleaseHistories(filter map[string]string, offset, limit uint32) (uint32, []*model.ConfigFileReleaseHistory, error)
QueryConfigFileReleaseHistories 获取配置文件的发布历史记录
func (StableOptStore) QueryConfigFiles ¶
func (cf StableOptStore) QueryConfigFiles(filter map[string]string, offset, limit uint32) ( uint32, []*model.ConfigFile, error)
QueryConfigFiles 翻页查询配置文件,group、name可为模糊匹配
func (StableOptStore) ReleaseLeaderElection ¶
ReleaseLeaderElection release election lock
func (StableOptStore) RemoveStrategyResources ¶
func (s StableOptStore) RemoveStrategyResources(resources []model.StrategyResource) error
RemoveStrategyResources 删除策略的资源
func (StableOptStore) SetInstanceHealthStatus ¶
func (ins StableOptStore) SetInstanceHealthStatus(instanceID string, flag int, revision string) error
SetInstanceHealthStatus 设置实例健康状态
func (StableOptStore) SetL5Extend ¶
func (l5 StableOptStore) SetL5Extend(serviceID string, meta map[string]interface{}) (map[string]interface{}, error)
SetL5Extend 保存L5扩展数据
func (StableOptStore) StartLeaderElection ¶
StartLeaderElection start the election procedure
func (*StableOptStore) StartReadTx ¶
func (s *StableOptStore) StartReadTx() (store.Tx, error)
func (StableOptStore) StopLeaderElections ¶
func (m StableOptStore) StopLeaderElections()
StopLeaderElections stop the election procedure
func (StableOptStore) UpdateCircuitBreakerRule ¶
func (c StableOptStore) UpdateCircuitBreakerRule(cbRule *model.CircuitBreakerRule) error
UpdateCircuitBreakerRule 更新熔断规则
func (StableOptStore) UpdateClient ¶
UpdateClient update the client info
func (StableOptStore) UpdateConfigFileGroup ¶
func (fg StableOptStore) UpdateConfigFileGroup(fileGroup *model.ConfigFileGroup) error
UpdateConfigFileGroup 更新配置文件组信息
func (StableOptStore) UpdateConfigFileTx ¶
func (cf StableOptStore) UpdateConfigFileTx(tx store.Tx, file *model.ConfigFile) error
UpdateConfigFile 更新配置文件
func (StableOptStore) UpdateFaultDetectRule ¶
func (f StableOptStore) UpdateFaultDetectRule(fdRule *model.FaultDetectRule) error
UpdateFaultDetectRule update fault detect rule
func (StableOptStore) UpdateGroup ¶
func (u StableOptStore) UpdateGroup(group *model.ModifyUserGroup) error
UpdateGroup 更新用户组
func (StableOptStore) UpdateInstance ¶
UpdateInstance 更新实例
func (StableOptStore) UpdateNamespace ¶
UpdateNamespace 更新命名空间,目前只更新owner
func (StableOptStore) UpdateNamespaceToken ¶
UpdateNamespaceToken 更新命名空间token
func (StableOptStore) UpdateRateLimit ¶
UpdateRateLimit 更新限流规则
func (StableOptStore) UpdateRoutingConfig ¶
func (rs StableOptStore) UpdateRoutingConfig(conf *model.RoutingConfig) error
UpdateRoutingConfig 更新
func (StableOptStore) UpdateRoutingConfigV2 ¶
func (r StableOptStore) UpdateRoutingConfigV2(conf *model.RouterConfig) error
UpdateRoutingConfigV2 Update a routing configuration
func (StableOptStore) UpdateRoutingConfigV2Tx ¶
func (r StableOptStore) UpdateRoutingConfigV2Tx(tx store.Tx, conf *model.RouterConfig) error
func (StableOptStore) UpdateService ¶
UpdateService 更新完整的服务信息
func (StableOptStore) UpdateServiceAlias ¶
UpdateServiceAlias 更新服务别名
func (StableOptStore) UpdateServiceContract ¶
func (s StableOptStore) UpdateServiceContract(contract *model.ServiceContract) error
UpdateServiceContract 更新服务契约信息
func (StableOptStore) UpdateServiceToken ¶
UpdateServiceToken 更新服务token
func (StableOptStore) UpdateStrategy ¶
func (s StableOptStore) UpdateStrategy(strategy *model.ModifyStrategyDetail) error
UpdateStrategy 更新鉴权规则
func (StableOptStore) UpdateUser ¶
UpdateUser 更新用户信息
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) CreateReadView ¶
func (*Tx) GetDelegateTx ¶
func (t *Tx) GetDelegateTx() interface{}
Source Files ¶
- admin.go
- base_db.go
- circuitbreaker_config_v2.go
- client.go
- common.go
- config_file.go
- config_file_group.go
- config_file_release.go
- config_file_release_history.go
- config_file_template.go
- default.go
- fault_detect_config.go
- gray_resouce.go
- group.go
- instance.go
- l5.go
- log.go
- namespace.go
- ratelimit_config.go
- routing_config.go
- routing_config_v2.go
- service.go
- service_contract.go
- sql.go
- strategy.go
- tool.go
- transaction.go
- tx.go
- user.go