Add UnregisterClient RPC method

This commit is contained in:
Aleksander Ogurtsov 2026-03-04 04:19:48 +03:00
parent d063433b69
commit 22309e99c2
3 changed files with 176 additions and 21 deletions

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.36.11 // protoc-gen-go v1.36.11
// protoc v3.21.12 // protoc v7.34.0
// source: proto/agent.proto // source: proto/agent.proto
package proto package proto
@ -313,6 +313,102 @@ func (x *RegisterClientResponse) GetClient() *ClientConfig {
return nil return nil
} }
type UnregisterClientRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UnregisterClientRequest) Reset() {
*x = UnregisterClientRequest{}
mi := &file_proto_agent_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UnregisterClientRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnregisterClientRequest) ProtoMessage() {}
func (x *UnregisterClientRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_agent_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UnregisterClientRequest.ProtoReflect.Descriptor instead.
func (*UnregisterClientRequest) Descriptor() ([]byte, []int) {
return file_proto_agent_proto_rawDescGZIP(), []int{5}
}
func (x *UnregisterClientRequest) GetPublicKey() string {
if x != nil {
return x.PublicKey
}
return ""
}
type UnregisterClientResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UnregisterClientResponse) Reset() {
*x = UnregisterClientResponse{}
mi := &file_proto_agent_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UnregisterClientResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnregisterClientResponse) ProtoMessage() {}
func (x *UnregisterClientResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_agent_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UnregisterClientResponse.ProtoReflect.Descriptor instead.
func (*UnregisterClientResponse) Descriptor() ([]byte, []int) {
return file_proto_agent_proto_rawDescGZIP(), []int{6}
}
func (x *UnregisterClientResponse) GetSuccess() bool {
if x != nil {
return x.Success
}
return false
}
func (x *UnregisterClientResponse) GetError() string {
if x != nil {
return x.Error
}
return ""
}
type GetServerStatusRequest struct { type GetServerStatusRequest struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
@ -321,7 +417,7 @@ type GetServerStatusRequest struct {
func (x *GetServerStatusRequest) Reset() { func (x *GetServerStatusRequest) Reset() {
*x = GetServerStatusRequest{} *x = GetServerStatusRequest{}
mi := &file_proto_agent_proto_msgTypes[5] mi := &file_proto_agent_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -333,7 +429,7 @@ func (x *GetServerStatusRequest) String() string {
func (*GetServerStatusRequest) ProtoMessage() {} func (*GetServerStatusRequest) ProtoMessage() {}
func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message { func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
mi := &file_proto_agent_proto_msgTypes[5] mi := &file_proto_agent_proto_msgTypes[7]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -346,7 +442,7 @@ func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetServerStatusRequest.ProtoReflect.Descriptor instead. // Deprecated: Use GetServerStatusRequest.ProtoReflect.Descriptor instead.
func (*GetServerStatusRequest) Descriptor() ([]byte, []int) { func (*GetServerStatusRequest) Descriptor() ([]byte, []int) {
return file_proto_agent_proto_rawDescGZIP(), []int{5} return file_proto_agent_proto_rawDescGZIP(), []int{7}
} }
type GetServerStatusResponse struct { type GetServerStatusResponse struct {
@ -363,7 +459,7 @@ type GetServerStatusResponse struct {
func (x *GetServerStatusResponse) Reset() { func (x *GetServerStatusResponse) Reset() {
*x = GetServerStatusResponse{} *x = GetServerStatusResponse{}
mi := &file_proto_agent_proto_msgTypes[6] mi := &file_proto_agent_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -375,7 +471,7 @@ func (x *GetServerStatusResponse) String() string {
func (*GetServerStatusResponse) ProtoMessage() {} func (*GetServerStatusResponse) ProtoMessage() {}
func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message { func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
mi := &file_proto_agent_proto_msgTypes[6] mi := &file_proto_agent_proto_msgTypes[8]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -388,7 +484,7 @@ func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetServerStatusResponse.ProtoReflect.Descriptor instead. // Deprecated: Use GetServerStatusResponse.ProtoReflect.Descriptor instead.
func (*GetServerStatusResponse) Descriptor() ([]byte, []int) { func (*GetServerStatusResponse) Descriptor() ([]byte, []int) {
return file_proto_agent_proto_rawDescGZIP(), []int{6} return file_proto_agent_proto_rawDescGZIP(), []int{8}
} }
func (x *GetServerStatusResponse) GetSuccess() bool { func (x *GetServerStatusResponse) GetSuccess() bool {
@ -461,7 +557,13 @@ const file_proto_agent_proto_rawDesc = "" +
"\x16RegisterClientResponse\x12\x18\n" + "\x16RegisterClientResponse\x12\x18\n" +
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
"\x05error\x18\x02 \x01(\tR\x05error\x12+\n" + "\x05error\x18\x02 \x01(\tR\x05error\x12+\n" +
"\x06client\x18\x03 \x01(\v2\x13.agent.ClientConfigR\x06client\"\x18\n" + "\x06client\x18\x03 \x01(\v2\x13.agent.ClientConfigR\x06client\"8\n" +
"\x17UnregisterClientRequest\x12\x1d\n" +
"\n" +
"public_key\x18\x01 \x01(\tR\tpublicKey\"J\n" +
"\x18UnregisterClientResponse\x12\x18\n" +
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
"\x05error\x18\x02 \x01(\tR\x05error\"\x18\n" +
"\x16GetServerStatusRequest\"\xd7\x01\n" + "\x16GetServerStatusRequest\"\xd7\x01\n" +
"\x17GetServerStatusResponse\x12\x18\n" + "\x17GetServerStatusResponse\x12\x18\n" +
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
@ -471,10 +573,11 @@ const file_proto_agent_proto_rawDesc = "" +
"public_key\x18\x04 \x01(\tR\tpublicKey\x12%\n" + "public_key\x18\x04 \x01(\tR\tpublicKey\x12%\n" +
"\x0elistening_port\x18\x05 \x01(\tR\rlisteningPort\x12\x1f\n" + "\x0elistening_port\x18\x05 \x01(\tR\rlisteningPort\x12\x1f\n" +
"\vpeers_count\x18\x06 \x01(\x05R\n" + "\vpeers_count\x18\x06 \x01(\x05R\n" +
"peersCount2\x86\x02\n" + "peersCount2\xdb\x02\n" +
"\x0eWireGuardAgent\x12S\n" + "\x0eWireGuardAgent\x12S\n" +
"\x10GetClientConfigs\x12\x1e.agent.GetClientConfigsRequest\x1a\x1f.agent.GetClientConfigsResponse\x12M\n" + "\x10GetClientConfigs\x12\x1e.agent.GetClientConfigsRequest\x1a\x1f.agent.GetClientConfigsResponse\x12M\n" +
"\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12P\n" + "\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12S\n" +
"\x10UnregisterClient\x12\x1e.agent.UnregisterClientRequest\x1a\x1f.agent.UnregisterClientResponse\x12P\n" +
"\x0fGetServerStatus\x12\x1d.agent.GetServerStatusRequest\x1a\x1e.agent.GetServerStatusResponseB\x13Z\x11l_vpn_proto/protob\x06proto3" "\x0fGetServerStatus\x12\x1d.agent.GetServerStatusRequest\x1a\x1e.agent.GetServerStatusResponseB\x13Z\x11l_vpn_proto/protob\x06proto3"
var ( var (
@ -489,27 +592,31 @@ func file_proto_agent_proto_rawDescGZIP() []byte {
return file_proto_agent_proto_rawDescData return file_proto_agent_proto_rawDescData
} }
var file_proto_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_proto_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_proto_agent_proto_goTypes = []any{ var file_proto_agent_proto_goTypes = []any{
(*GetClientConfigsRequest)(nil), // 0: agent.GetClientConfigsRequest (*GetClientConfigsRequest)(nil), // 0: agent.GetClientConfigsRequest
(*ClientConfig)(nil), // 1: agent.ClientConfig (*ClientConfig)(nil), // 1: agent.ClientConfig
(*GetClientConfigsResponse)(nil), // 2: agent.GetClientConfigsResponse (*GetClientConfigsResponse)(nil), // 2: agent.GetClientConfigsResponse
(*RegisterClientRequest)(nil), // 3: agent.RegisterClientRequest (*RegisterClientRequest)(nil), // 3: agent.RegisterClientRequest
(*RegisterClientResponse)(nil), // 4: agent.RegisterClientResponse (*RegisterClientResponse)(nil), // 4: agent.RegisterClientResponse
(*GetServerStatusRequest)(nil), // 5: agent.GetServerStatusRequest (*UnregisterClientRequest)(nil), // 5: agent.UnregisterClientRequest
(*GetServerStatusResponse)(nil), // 6: agent.GetServerStatusResponse (*UnregisterClientResponse)(nil), // 6: agent.UnregisterClientResponse
(*GetServerStatusRequest)(nil), // 7: agent.GetServerStatusRequest
(*GetServerStatusResponse)(nil), // 8: agent.GetServerStatusResponse
} }
var file_proto_agent_proto_depIdxs = []int32{ var file_proto_agent_proto_depIdxs = []int32{
1, // 0: agent.GetClientConfigsResponse.clients:type_name -> agent.ClientConfig 1, // 0: agent.GetClientConfigsResponse.clients:type_name -> agent.ClientConfig
1, // 1: agent.RegisterClientResponse.client:type_name -> agent.ClientConfig 1, // 1: agent.RegisterClientResponse.client:type_name -> agent.ClientConfig
0, // 2: agent.WireGuardAgent.GetClientConfigs:input_type -> agent.GetClientConfigsRequest 0, // 2: agent.WireGuardAgent.GetClientConfigs:input_type -> agent.GetClientConfigsRequest
3, // 3: agent.WireGuardAgent.RegisterClient:input_type -> agent.RegisterClientRequest 3, // 3: agent.WireGuardAgent.RegisterClient:input_type -> agent.RegisterClientRequest
5, // 4: agent.WireGuardAgent.GetServerStatus:input_type -> agent.GetServerStatusRequest 5, // 4: agent.WireGuardAgent.UnregisterClient:input_type -> agent.UnregisterClientRequest
2, // 5: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse 7, // 5: agent.WireGuardAgent.GetServerStatus:input_type -> agent.GetServerStatusRequest
4, // 6: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse 2, // 6: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse
6, // 7: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse 4, // 7: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse
5, // [5:8] is the sub-list for method output_type 6, // 8: agent.WireGuardAgent.UnregisterClient:output_type -> agent.UnregisterClientResponse
2, // [2:5] is the sub-list for method input_type 8, // 9: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse
6, // [6:10] is the sub-list for method output_type
2, // [2:6] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee 2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name 0, // [0:2] is the sub-list for field type_name
@ -526,7 +633,7 @@ func file_proto_agent_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_agent_proto_rawDesc), len(file_proto_agent_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_agent_proto_rawDesc), len(file_proto_agent_proto_rawDesc)),
NumEnums: 0, NumEnums: 0,
NumMessages: 7, NumMessages: 9,
NumExtensions: 0, NumExtensions: 0,
NumServices: 1, NumServices: 1,
}, },

View File

@ -7,6 +7,7 @@ option go_package = "l_vpn_proto/proto";
service WireGuardAgent { service WireGuardAgent {
rpc GetClientConfigs(GetClientConfigsRequest) returns (GetClientConfigsResponse); rpc GetClientConfigs(GetClientConfigsRequest) returns (GetClientConfigsResponse);
rpc RegisterClient(RegisterClientRequest) returns (RegisterClientResponse); rpc RegisterClient(RegisterClientRequest) returns (RegisterClientResponse);
rpc UnregisterClient(UnregisterClientRequest) returns (UnregisterClientResponse);
rpc GetServerStatus(GetServerStatusRequest) returns (GetServerStatusResponse); rpc GetServerStatus(GetServerStatusRequest) returns (GetServerStatusResponse);
} }
@ -38,6 +39,15 @@ message RegisterClientResponse {
ClientConfig client = 3; ClientConfig client = 3;
} }
message UnregisterClientRequest {
string public_key = 1;
}
message UnregisterClientResponse {
bool success = 1;
string error = 2;
}
message GetServerStatusRequest {} message GetServerStatusRequest {}
message GetServerStatusResponse { message GetServerStatusResponse {

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.6.1 // - protoc-gen-go-grpc v1.6.1
// - protoc v3.21.12 // - protoc v7.34.0
// source: proto/agent.proto // source: proto/agent.proto
package proto package proto
@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion9
const ( const (
WireGuardAgent_GetClientConfigs_FullMethodName = "/agent.WireGuardAgent/GetClientConfigs" WireGuardAgent_GetClientConfigs_FullMethodName = "/agent.WireGuardAgent/GetClientConfigs"
WireGuardAgent_RegisterClient_FullMethodName = "/agent.WireGuardAgent/RegisterClient" WireGuardAgent_RegisterClient_FullMethodName = "/agent.WireGuardAgent/RegisterClient"
WireGuardAgent_UnregisterClient_FullMethodName = "/agent.WireGuardAgent/UnregisterClient"
WireGuardAgent_GetServerStatus_FullMethodName = "/agent.WireGuardAgent/GetServerStatus" WireGuardAgent_GetServerStatus_FullMethodName = "/agent.WireGuardAgent/GetServerStatus"
) )
@ -30,6 +31,7 @@ const (
type WireGuardAgentClient interface { type WireGuardAgentClient interface {
GetClientConfigs(ctx context.Context, in *GetClientConfigsRequest, opts ...grpc.CallOption) (*GetClientConfigsResponse, error) GetClientConfigs(ctx context.Context, in *GetClientConfigsRequest, opts ...grpc.CallOption) (*GetClientConfigsResponse, error)
RegisterClient(ctx context.Context, in *RegisterClientRequest, opts ...grpc.CallOption) (*RegisterClientResponse, error) RegisterClient(ctx context.Context, in *RegisterClientRequest, opts ...grpc.CallOption) (*RegisterClientResponse, error)
UnregisterClient(ctx context.Context, in *UnregisterClientRequest, opts ...grpc.CallOption) (*UnregisterClientResponse, error)
GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error) GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error)
} }
@ -61,6 +63,16 @@ func (c *wireGuardAgentClient) RegisterClient(ctx context.Context, in *RegisterC
return out, nil return out, nil
} }
func (c *wireGuardAgentClient) UnregisterClient(ctx context.Context, in *UnregisterClientRequest, opts ...grpc.CallOption) (*UnregisterClientResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(UnregisterClientResponse)
err := c.cc.Invoke(ctx, WireGuardAgent_UnregisterClient_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error) { func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetServerStatusResponse) out := new(GetServerStatusResponse)
@ -77,6 +89,7 @@ func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServe
type WireGuardAgentServer interface { type WireGuardAgentServer interface {
GetClientConfigs(context.Context, *GetClientConfigsRequest) (*GetClientConfigsResponse, error) GetClientConfigs(context.Context, *GetClientConfigsRequest) (*GetClientConfigsResponse, error)
RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error) RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error)
UnregisterClient(context.Context, *UnregisterClientRequest) (*UnregisterClientResponse, error)
GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error) GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error)
mustEmbedUnimplementedWireGuardAgentServer() mustEmbedUnimplementedWireGuardAgentServer()
} }
@ -94,6 +107,9 @@ func (UnimplementedWireGuardAgentServer) GetClientConfigs(context.Context, *GetC
func (UnimplementedWireGuardAgentServer) RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error) { func (UnimplementedWireGuardAgentServer) RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RegisterClient not implemented") return nil, status.Error(codes.Unimplemented, "method RegisterClient not implemented")
} }
func (UnimplementedWireGuardAgentServer) UnregisterClient(context.Context, *UnregisterClientRequest) (*UnregisterClientResponse, error) {
return nil, status.Error(codes.Unimplemented, "method UnregisterClient not implemented")
}
func (UnimplementedWireGuardAgentServer) GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error) { func (UnimplementedWireGuardAgentServer) GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error) {
return nil, status.Error(codes.Unimplemented, "method GetServerStatus not implemented") return nil, status.Error(codes.Unimplemented, "method GetServerStatus not implemented")
} }
@ -154,6 +170,24 @@ func _WireGuardAgent_RegisterClient_Handler(srv interface{}, ctx context.Context
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _WireGuardAgent_UnregisterClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnregisterClientRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WireGuardAgentServer).UnregisterClient(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WireGuardAgent_UnregisterClient_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WireGuardAgentServer).UnregisterClient(ctx, req.(*UnregisterClientRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WireGuardAgent_GetServerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _WireGuardAgent_GetServerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetServerStatusRequest) in := new(GetServerStatusRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -187,6 +221,10 @@ var WireGuardAgent_ServiceDesc = grpc.ServiceDesc{
MethodName: "RegisterClient", MethodName: "RegisterClient",
Handler: _WireGuardAgent_RegisterClient_Handler, Handler: _WireGuardAgent_RegisterClient_Handler,
}, },
{
MethodName: "UnregisterClient",
Handler: _WireGuardAgent_UnregisterClient_Handler,
},
{ {
MethodName: "GetServerStatus", MethodName: "GetServerStatus",
Handler: _WireGuardAgent_GetServerStatus_Handler, Handler: _WireGuardAgent_GetServerStatus_Handler,