mirror of
https://github.com/valitydev/limiter-proto.git
synced 2024-11-06 08:45:17 +00:00
16b1f8c8fd
* Bump damsel ref 9859ca2
41 lines
1.3 KiB
Thrift
41 lines
1.3 KiB
Thrift
include "proto/base.thrift"
|
|
include "limiter.thrift"
|
|
include "limiter_config.thrift"
|
|
|
|
namespace java dev.vality.limiter.configurator
|
|
namespace erlang limproto.configurator
|
|
|
|
typedef string LimitName
|
|
typedef limiter_config.LimitConfigID LimitConfigID
|
|
typedef limiter_config.ShardSize ShardSize
|
|
typedef limiter_config.LimitConfig LimitConfig
|
|
typedef limiter_config.OperationLimitBehaviour OperationLimitBehaviour
|
|
|
|
struct LimitCreateParams {
|
|
1: required LimitConfigID id
|
|
2: required base.Timestamp started_at
|
|
/** Идентификатор набора настроек создаваемого лимита, в будущем идентификатор заменит структура конфигурации */
|
|
3: optional LimitName name
|
|
4: optional string description
|
|
6: optional OperationLimitBehaviour op_behaviour
|
|
}
|
|
|
|
exception LimitConfigNameNotFound {}
|
|
exception LimitConfigNotFound {}
|
|
|
|
service Configurator {
|
|
LimitConfig CreateLegacy(1: LimitCreateParams params) throws (
|
|
1: LimitConfigNameNotFound e1,
|
|
2: base.InvalidRequest e2
|
|
)
|
|
|
|
LimitConfig Create(1: limiter_config.LimitConfigParams params) throws (
|
|
1: base.InvalidRequest e1
|
|
)
|
|
|
|
LimitConfig Get(1: LimitConfigID id) throws (
|
|
1: LimitConfigNotFound e1,
|
|
2: base.InvalidRequest e2
|
|
)
|
|
}
|