add authentication guard
This commit is contained in:
parent
70058c3b45
commit
170c3c1511
5 changed files with 96 additions and 2 deletions
|
|
@ -62,6 +62,7 @@ type ServiceInfo struct {
|
|||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
|
||||
Healthz string `protobuf:"bytes,3,opt,name=healthz,proto3" json:"healthz,omitempty"`
|
||||
Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
|
@ -117,6 +118,13 @@ func (x *ServiceInfo) GetHealthz() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *ServiceInfo) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ServiceHeartbeat struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
|
|
@ -402,11 +410,12 @@ var File_registry_proto protoreflect.FileDescriptor
|
|||
const file_registry_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0eregistry.proto\x12\bregistry\"\a\n" +
|
||||
"\x05Empty\"M\n" +
|
||||
"\x05Empty\"c\n" +
|
||||
"\vServiceInfo\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n" +
|
||||
"\x03url\x18\x02 \x01(\tR\x03url\x12\x18\n" +
|
||||
"\ahealthz\x18\x03 \x01(\tR\ahealthz\"8\n" +
|
||||
"\ahealthz\x18\x03 \x01(\tR\ahealthz\x12\x14\n" +
|
||||
"\x05token\x18\x04 \x01(\tR\x05token\"8\n" +
|
||||
"\x10ServiceHeartbeat\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n" +
|
||||
"\x03url\x18\x02 \x01(\tR\x03url\"1\n" +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue