github.com/go-board/x-go@v0.1.2-0.20220610024734-db1323f6cb15/lock/lock.go (about)

     1  package lock
     2  
     3  import (
     4  	"context"
     5  	"time"
     6  )
     7  
     8  type Locker interface {
     9  	Do(ctx context.Context, name string, duration time.Duration, fn func(ctx context.Context) error) error
    10  }