syntax = "proto3";

option go_package = ".;mlbctl";

package mlbctl;

service Control {
  rpc getHello(getHelloParams) returns (getHelloResult) {};
  rpc createForwarder(createForwarderParams) returns (createForwarderResult) {};
  rpc listForwarders(listForwardersParams) returns (listForwardersResult) {};
  rpc deleteForwarder(deleteForwarderParams) returns (deleteForwarderResult) {};
}

message getHelloParams {}
message getHelloResult {
  string message      = 1;
}

message forwarder {
  uint32 lport        = 1;
  uint32 dport        = 2;
  repeated destination destinations  = 3;
}

message destination {
  string address      = 1;
}

message listForwardersParams {}
message listForwardersResult {
  repeated forwarder forwarders = 1;
}

message createForwarderParams {
  uint32 lport        = 1;
  uint32 dport        = 2;
  repeated string destinations  = 3;
}
message createForwarderResult {}

message deleteForwarderParams {
  uint32 lport = 1;
}
message deleteForwarderResult {}
