Documentation ¶
Index ¶
- Variables
- func RegisterResetServiceServer(s grpc.ServiceRegistrar, srv ResetServiceServer)
- func RegisterTimeServiceServer(s grpc.ServiceRegistrar, srv TimeServiceServer)
- type GetTimeRequest
- type GetTimeResponse
- func (*GetTimeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTimeResponse) GetCurrentTime() *timestamppb.Timestamp
- func (*GetTimeResponse) ProtoMessage()
- func (x *GetTimeResponse) ProtoReflect() protoreflect.Message
- func (x *GetTimeResponse) Reset()
- func (x *GetTimeResponse) String() string
- type ResetRequest
- type ResetServiceClient
- type ResetServiceServer
- type SetTimeRequest
- func (*SetTimeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetTimeRequest) GetCurrentTime() *timestamppb.Timestamp
- func (x *SetTimeRequest) GetLedgerId() string
- func (x *SetTimeRequest) GetNewTime() *timestamppb.Timestamp
- func (*SetTimeRequest) ProtoMessage()
- func (x *SetTimeRequest) ProtoReflect() protoreflect.Message
- func (x *SetTimeRequest) Reset()
- func (x *SetTimeRequest) String() string
- type TimeServiceClient
- type TimeServiceServer
- type TimeService_GetTimeClient
- type TimeService_GetTimeServer
- type UnimplementedResetServiceServer
- type UnimplementedTimeServiceServer
- type UnsafeResetServiceServer
- type UnsafeTimeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_com_daml_ledger_api_v1_testing_reset_service_proto protoreflect.FileDescriptor
var File_com_daml_ledger_api_v1_testing_time_service_proto protoreflect.FileDescriptor
var ResetService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "com.daml.ledger.api.v1.testing.ResetService", HandlerType: (*ResetServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Reset", Handler: _ResetService_Reset_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "com/daml/ledger/api/v1/testing/reset_service.proto", }
ResetService_ServiceDesc is the grpc.ServiceDesc for ResetService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var TimeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "com.daml.ledger.api.v1.testing.TimeService", HandlerType: (*TimeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetTime", Handler: _TimeService_SetTime_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetTime", Handler: _TimeService_GetTime_Handler, ServerStreams: true, }, }, Metadata: "com/daml/ledger/api/v1/testing/time_service.proto", }
TimeService_ServiceDesc is the grpc.ServiceDesc for TimeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterResetServiceServer ¶
func RegisterResetServiceServer(s grpc.ServiceRegistrar, srv ResetServiceServer)
func RegisterTimeServiceServer ¶
func RegisterTimeServiceServer(s grpc.ServiceRegistrar, srv TimeServiceServer)
Types ¶
type GetTimeRequest ¶
type GetTimeRequest struct { // Must correspond to the ledger ID reported by the Ledger Identification Service. // Must be a valid LedgerString (as describe in “value.proto“). // Optional LedgerId string `protobuf:"bytes,1,opt,name=ledger_id,json=ledgerId,proto3" json:"ledger_id,omitempty"` // contains filtered or unexported fields }
func (*GetTimeRequest) Descriptor
deprecated
func (*GetTimeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTimeRequest.ProtoReflect.Descriptor instead.
func (*GetTimeRequest) GetLedgerId ¶
func (x *GetTimeRequest) GetLedgerId() string
func (*GetTimeRequest) ProtoMessage ¶
func (*GetTimeRequest) ProtoMessage()
func (*GetTimeRequest) ProtoReflect ¶
func (x *GetTimeRequest) ProtoReflect() protoreflect.Message
func (*GetTimeRequest) Reset ¶
func (x *GetTimeRequest) Reset()
func (*GetTimeRequest) String ¶
func (x *GetTimeRequest) String() string
type GetTimeResponse ¶
type GetTimeResponse struct { // The current time according to the ledger server. CurrentTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"` // contains filtered or unexported fields }
func (*GetTimeResponse) Descriptor
deprecated
func (*GetTimeResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTimeResponse.ProtoReflect.Descriptor instead.
func (*GetTimeResponse) GetCurrentTime ¶
func (x *GetTimeResponse) GetCurrentTime() *timestamppb.Timestamp
func (*GetTimeResponse) ProtoMessage ¶
func (*GetTimeResponse) ProtoMessage()
func (*GetTimeResponse) ProtoReflect ¶
func (x *GetTimeResponse) ProtoReflect() protoreflect.Message
func (*GetTimeResponse) Reset ¶
func (x *GetTimeResponse) Reset()
func (*GetTimeResponse) String ¶
func (x *GetTimeResponse) String() string
type ResetRequest ¶
type ResetRequest struct { // Must correspond to the ledger ID reported by the Ledger Identification Service. // Must be a valid LedgerString (as describe in “value.proto“). // Required LedgerId string `protobuf:"bytes,1,opt,name=ledger_id,json=ledgerId,proto3" json:"ledger_id,omitempty"` // contains filtered or unexported fields }
func (*ResetRequest) Descriptor
deprecated
func (*ResetRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResetRequest.ProtoReflect.Descriptor instead.
func (*ResetRequest) GetLedgerId ¶
func (x *ResetRequest) GetLedgerId() string
func (*ResetRequest) ProtoMessage ¶
func (*ResetRequest) ProtoMessage()
func (*ResetRequest) ProtoReflect ¶
func (x *ResetRequest) ProtoReflect() protoreflect.Message
func (*ResetRequest) Reset ¶
func (x *ResetRequest) Reset()
func (*ResetRequest) String ¶
func (x *ResetRequest) String() string
type ResetServiceClient ¶
type ResetServiceClient interface { // Resets the ledger state. Note that loaded DARs won't be removed -- this only rolls back the // ledger to genesis. Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
ResetServiceClient is the client API for ResetService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewResetServiceClient ¶
func NewResetServiceClient(cc grpc.ClientConnInterface) ResetServiceClient
type ResetServiceServer ¶
type ResetServiceServer interface { // Resets the ledger state. Note that loaded DARs won't be removed -- this only rolls back the // ledger to genesis. Reset(context.Context, *ResetRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
ResetServiceServer is the server API for ResetService service. All implementations must embed UnimplementedResetServiceServer for forward compatibility
type SetTimeRequest ¶
type SetTimeRequest struct { // Must correspond to the ledger ID reported by the Ledger Identification Service. // Must be a valid LedgerString (as describe in “value.proto“). // Optional LedgerId string `protobuf:"bytes,1,opt,name=ledger_id,json=ledgerId,proto3" json:"ledger_id,omitempty"` // MUST precisely match the current time as it's known to the ledger server. CurrentTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"` // The time the client wants to set on the ledger. // MUST be a point int time after “current_time“. NewTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=new_time,json=newTime,proto3" json:"new_time,omitempty"` // contains filtered or unexported fields }
func (*SetTimeRequest) Descriptor
deprecated
func (*SetTimeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetTimeRequest.ProtoReflect.Descriptor instead.
func (*SetTimeRequest) GetCurrentTime ¶
func (x *SetTimeRequest) GetCurrentTime() *timestamppb.Timestamp
func (*SetTimeRequest) GetLedgerId ¶
func (x *SetTimeRequest) GetLedgerId() string
func (*SetTimeRequest) GetNewTime ¶
func (x *SetTimeRequest) GetNewTime() *timestamppb.Timestamp
func (*SetTimeRequest) ProtoMessage ¶
func (*SetTimeRequest) ProtoMessage()
func (*SetTimeRequest) ProtoReflect ¶
func (x *SetTimeRequest) ProtoReflect() protoreflect.Message
func (*SetTimeRequest) Reset ¶
func (x *SetTimeRequest) Reset()
func (*SetTimeRequest) String ¶
func (x *SetTimeRequest) String() string
type TimeServiceClient ¶
type TimeServiceClient interface { // Returns a stream of time updates. // Always returns at least one response, where the first one is the current time. // Subsequent responses are emitted whenever the ledger server's time is updated. GetTime(ctx context.Context, in *GetTimeRequest, opts ...grpc.CallOption) (TimeService_GetTimeClient, error) // Allows clients to change the ledger's clock in an atomic get-and-set operation. // Errors: // - “INVALID_ARGUMENT“: if “current_time“ is invalid (it MUST precisely match the current time as it's known to the ledger server) SetTime(ctx context.Context, in *SetTimeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
TimeServiceClient is the client API for TimeService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTimeServiceClient ¶
func NewTimeServiceClient(cc grpc.ClientConnInterface) TimeServiceClient
type TimeServiceServer ¶
type TimeServiceServer interface { // Returns a stream of time updates. // Always returns at least one response, where the first one is the current time. // Subsequent responses are emitted whenever the ledger server's time is updated. GetTime(*GetTimeRequest, TimeService_GetTimeServer) error // Allows clients to change the ledger's clock in an atomic get-and-set operation. // Errors: // - “INVALID_ARGUMENT“: if “current_time“ is invalid (it MUST precisely match the current time as it's known to the ledger server) SetTime(context.Context, *SetTimeRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
TimeServiceServer is the server API for TimeService service. All implementations must embed UnimplementedTimeServiceServer for forward compatibility
type TimeService_GetTimeClient ¶
type TimeService_GetTimeClient interface { Recv() (*GetTimeResponse, error) grpc.ClientStream }
type TimeService_GetTimeServer ¶
type TimeService_GetTimeServer interface { Send(*GetTimeResponse) error grpc.ServerStream }
type UnimplementedResetServiceServer ¶
type UnimplementedResetServiceServer struct { }
UnimplementedResetServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedResetServiceServer) Reset ¶
func (UnimplementedResetServiceServer) Reset(context.Context, *ResetRequest) (*emptypb.Empty, error)
type UnimplementedTimeServiceServer ¶
type UnimplementedTimeServiceServer struct { }
UnimplementedTimeServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTimeServiceServer) GetTime ¶
func (UnimplementedTimeServiceServer) GetTime(*GetTimeRequest, TimeService_GetTimeServer) error
func (UnimplementedTimeServiceServer) SetTime ¶
func (UnimplementedTimeServiceServer) SetTime(context.Context, *SetTimeRequest) (*emptypb.Empty, error)
type UnsafeResetServiceServer ¶
type UnsafeResetServiceServer interface {
// contains filtered or unexported methods
}
UnsafeResetServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResetServiceServer will result in compilation errors.
type UnsafeTimeServiceServer ¶
type UnsafeTimeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTimeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TimeServiceServer will result in compilation errors.