GODT-1982: updated gRPC and GUI for disk cache.

Other: modified bridge-gui-tester for new cache related gRPC interface.
Other: bridge-gui-tester has buttons for cache related errors.
This commit is contained in:
Xavier Michelon
2022-10-27 18:59:42 +02:00
committed by James Houlahan
parent 93d9ae32fc
commit d9762010fa
27 changed files with 2662 additions and 3947 deletions

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// - protoc v3.21.3
// source: bridge.proto
package grpc
@ -66,7 +66,7 @@ type BridgeClient interface {
IsAutomaticUpdateOn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
// cache
DiskCachePath(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.StringValue, error)
ChangeLocalCache(ctx context.Context, in *ChangeLocalCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
SetDiskCachePath(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
// mail
SetIsDoHEnabled(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
IsDoHEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
@ -436,9 +436,9 @@ func (c *bridgeClient) DiskCachePath(ctx context.Context, in *emptypb.Empty, opt
return out, nil
}
func (c *bridgeClient) ChangeLocalCache(ctx context.Context, in *ChangeLocalCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
func (c *bridgeClient) SetDiskCachePath(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/grpc.Bridge/ChangeLocalCache", in, out, opts...)
err := c.cc.Invoke(ctx, "/grpc.Bridge/SetDiskCachePath", in, out, opts...)
if err != nil {
return nil, err
}
@ -711,7 +711,7 @@ type BridgeServer interface {
IsAutomaticUpdateOn(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
// cache
DiskCachePath(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error)
ChangeLocalCache(context.Context, *ChangeLocalCacheRequest) (*emptypb.Empty, error)
SetDiskCachePath(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
// mail
SetIsDoHEnabled(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error)
IsDoHEnabled(context.Context, *emptypb.Empty) (*wrapperspb.BoolValue, error)
@ -856,8 +856,8 @@ func (UnimplementedBridgeServer) IsAutomaticUpdateOn(context.Context, *emptypb.E
func (UnimplementedBridgeServer) DiskCachePath(context.Context, *emptypb.Empty) (*wrapperspb.StringValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method DiskCachePath not implemented")
}
func (UnimplementedBridgeServer) ChangeLocalCache(context.Context, *ChangeLocalCacheRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ChangeLocalCache not implemented")
func (UnimplementedBridgeServer) SetDiskCachePath(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetDiskCachePath not implemented")
}
func (UnimplementedBridgeServer) SetIsDoHEnabled(context.Context, *wrapperspb.BoolValue) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetIsDoHEnabled not implemented")
@ -1604,20 +1604,20 @@ func _Bridge_DiskCachePath_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler)
}
func _Bridge_ChangeLocalCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ChangeLocalCacheRequest)
func _Bridge_SetDiskCachePath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(wrapperspb.StringValue)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BridgeServer).ChangeLocalCache(ctx, in)
return srv.(BridgeServer).SetDiskCachePath(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpc.Bridge/ChangeLocalCache",
FullMethod: "/grpc.Bridge/SetDiskCachePath",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BridgeServer).ChangeLocalCache(ctx, req.(*ChangeLocalCacheRequest))
return srv.(BridgeServer).SetDiskCachePath(ctx, req.(*wrapperspb.StringValue))
}
return interceptor(ctx, in, info, handler)
}
@ -2177,8 +2177,8 @@ var Bridge_ServiceDesc = grpc.ServiceDesc{
Handler: _Bridge_DiskCachePath_Handler,
},
{
MethodName: "ChangeLocalCache",
Handler: _Bridge_ChangeLocalCache_Handler,
MethodName: "SetDiskCachePath",
Handler: _Bridge_SetDiskCachePath_Handler,
},
{
MethodName: "SetIsDoHEnabled",