Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockForTest ¶
func MockForTest(store kv.Storage) autoid.AutoIDAllocClient
MockForTest is used for testing, the UT test and unistore use this.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implement the grpc AutoIDAlloc service, defined in kvproto/pkg/autoid.
func (*Service) AllocAutoID ¶
func (s *Service) AllocAutoID(ctx context.Context, req *autoid.AutoIDRequest) (*autoid.AutoIDResponse, error)
AllocAutoID implements gRPC AutoIDAlloc interface.
func (*Service) Rebase ¶
func (s *Service) Rebase(ctx context.Context, req *autoid.RebaseRequest) (*autoid.RebaseResponse, error)
Rebase implements gRPC AutoIDAlloc interface. req.N = 0 is handled specially, it is used to return the current auto ID value.
Click to show internal directories.
Click to hide internal directories.