/**
 * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
 */

option java_package = "akka.remote.testconductor";
option optimize_for = SPEED;

message Wrapper {
  optional Hello hello = 1;
  optional EnterBarrier barrier = 2;
  optional InjectFailure failure = 3;
  optional string done = 4;
  optional AddressRequest addr = 5;
}

message Hello {
  required string name = 1;
  required Address address = 2;
}

enum BarrierOp {
  Enter = 1;
  Fail = 2;
  Succeeded = 3;
  Failed = 4;
}

message EnterBarrier {
  required string name = 1;
  required BarrierOp op = 2;
  optional int64 timeout = 3;
}

message AddressRequest {
  required string node = 1;
  optional Address addr = 2;
}

message Address {
  required string protocol = 1;
  required string system = 2;
  required string host = 3;
  required int32 port = 4;
}

enum FailType {
  Throttle = 1;
  Disconnect = 2;
  Abort = 3;
  Exit = 4;
  Shutdown = 5;
  ShutdownAbrupt = 6;
}

enum Direction {
  Send = 1;
  Receive = 2;
  Both = 3;
}

message InjectFailure {
  required FailType failure = 1;
  optional Direction direction = 2;
  optional Address address = 3;
  optional float rateMBit = 6;
  optional int32 exitValue = 7;
}

