All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node.models.p2p.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";
import "scalapb/scalapb.proto";
import "scalapb/validate.proto";



package org.plasmalabs.node.models;

import "validate/validate.proto";


// Request type for CurrentKnownHosts
message CurrentKnownHostsReq {
  uint32 maxCount = 1;
}


message KnownHost {
  bytes id = 3 [(validate.rules).bytes.len = 32];
  string host = 1 [(validate.rules).string = {min_len: 1, max_len: 255}];
  uint32 port = 2; 
}

// Response type for CurrentKnownHosts
message CurrentKnownHostsRes {
  repeated KnownHost hotHosts = 1;
  repeated KnownHost warmHosts = 2;
  repeated KnownHost coldHosts = 3;
}

message PingMessage {
  string ping = 1  [(validate.rules).string.len = 1024];
}

message PongMessage {
  string pong = 1  [(validate.rules).string.len = 1024];
}
option (scalapb.options) = {
  [scalapb.validate.file] {
    validate_at_construction: true
  }
  field_transformations: [
    {
      when: {options: {[validate.rules] {message: {required: true}}}}
      set: {
        [scalapb.field] {
          required: true
        }
      }
    }
  ]
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy