woody_erlang/test/test.thrift
Toporkov Igor ed644d7d70
MSPF-490: Monitor to detect client disconnection (#111)
* Monitor to detect client disconnetion on server side

* Renaming save_woody_state

* Rework monitor to use one per connection

* Changed event type

* wip: stream handler skeleton

* wip: log abnormal termination

* Upgrade cowboy to 2.7.0

* Finish migration to stream_handler

* Upgrade more dependencies

* Fix state type, remove early_error logging

* rename woody_monitor to comply with cowboy naming

* remove redundant monitor pid from state

* Log only socket errors

* wrap put_woody_state

* experimental: monitor for woody_events

* add missing update

* match on handle_event return, don't monitor tracing

* Rework update_woody_state

* Slightly increase min_complexity in linter config

* Make event state transition explicit

* Remove handle_event wraper

* Revert "Slightly increase min_complexity in linter config"

This reverts commit 38301e3b5b66967cb08c0bf7f27a2a8042a40a19.

* match unmetched returns

* Add test

* Erase trailing whitespace

* Refactor test

* Delete mistakenly added file

* Rename function

* Review fixes

* Match supervisor return

Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com>

Co-authored-by: Andrew Mayorov <encube.ul@gmail.com>
2020-02-05 14:35:43 +03:00

65 lines
1.3 KiB
Thrift

namespace erl woody
struct Weapon {
1: required string name
2: required i16 slot_pos
3: optional i16 ammo
}
struct Powerup {
1: required string name
2: optional i16 level
3: optional i16 time_left
}
enum Direction {
NEXT = 1
PREV = 0
}
exception WeaponFailure {
1: required string exception_name = "weapon failure"
2: required string code
3: optional string reason
}
exception PowerupFailure {
1: required string exception_name = "powerup failure"
2: required string code
3: optional string reason
}
service Weapons {
Weapon switch_weapon(
1: Weapon current_weapon
2: Direction direction
3: i16 shift
4: binary data
) throws (1: WeaponFailure error)
Weapon get_weapon(
1: string name
2: binary data
) throws (1: WeaponFailure error)
void get_stuck_looping_weapons()
}
service Powerups {
Powerup get_powerup(
1: string name
2: binary data
) throws(1: PowerupFailure error)
Powerup proxy_get_powerup(
1: string name
2: binary data
) throws(1: PowerupFailure error)
Weapon bad_proxy_get_powerup(
1: string name
2: binary data
) throws(1: WeaponFailure error)
oneway void like_powerup(
1: string name
2: binary data
)
}