one commit contains all impl
This commit is contained in:
15
libvanity/protos/vanity.proto
Normal file
15
libvanity/protos/vanity.proto
Normal file
@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package vanity;
|
||||
|
||||
message VanityRequest {
|
||||
string pattern = 1;
|
||||
}
|
||||
|
||||
message VanityResponse {
|
||||
string result = 1;
|
||||
}
|
||||
|
||||
service VanityService {
|
||||
rpc RequestVanity(VanityRequest) returns (VanityResponse);
|
||||
}
|
26
libvanity/protos/worker.proto
Normal file
26
libvanity/protos/worker.proto
Normal file
@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package worker;
|
||||
|
||||
import "vanity.proto";
|
||||
|
||||
message NewRequest {
|
||||
uint64 id = 1;
|
||||
string pattern = 2;
|
||||
}
|
||||
|
||||
message Request {
|
||||
oneof NewOrDone {
|
||||
NewRequest new = 1;
|
||||
uint64 done = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message Result {
|
||||
uint64 id = 1;
|
||||
string result = 2;
|
||||
}
|
||||
|
||||
service Worker {
|
||||
rpc Poll(stream Result) returns (stream Request);
|
||||
}
|
Reference in New Issue
Block a user