Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCB-317 Prepare the release for Service-Center-1.0.0-m1 #269

Merged
merged 2 commits into from Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
331 changes: 0 additions & 331 deletions pkg/cache/cache.go

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/etcdsync/README.md
Expand Up @@ -2,8 +2,8 @@

## example

```bash
lock, _ := etcdsync.Lock("/test")
```go
lock, _ := etcdsync.Lock("/test", true)
defer lock.Unlock()
//do something
g += 1
Expand Down
2 changes: 1 addition & 1 deletion pkg/etcdsync/etcdsync_suite_test.go
Expand Up @@ -41,7 +41,7 @@ func BenchmarkLock(b *testing.B) {
var g = 0
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
lock, _ := etcdsync.Lock("/test")
lock, _ := etcdsync.Lock("/test", true)
defer lock.Unlock()
//do something
g += 1
Expand Down
14 changes: 0 additions & 14 deletions pkg/etcdsync/mutex.go
Expand Up @@ -35,7 +35,6 @@ const (
ROOT_PATH = "/cse/etcdsync"
)

// A Mutex is a mutual exclusion lock which is distributed across a cluster.
type DLockFactory struct {
key string
ctx context.Context
Expand Down Expand Up @@ -69,9 +68,6 @@ func init() {
pid = os.Getpid()
}

// New creates a Mutex with the given key which must be the same
// across the cluster nodes.
// machines are the ectd cluster addresses
func NewLockFactory(key string, ttl int64) *DLockFactory {
if len(key) == 0 {
return nil
Expand All @@ -88,10 +84,6 @@ func NewLockFactory(key string, ttl int64) *DLockFactory {
}
}

// Lock locks m.
// If the lock is already in use, the calling goroutine
// blocks until the mutex is available. Flag wait is false,
// this function is non-block when lock exist.
func (m *DLockFactory) NewDLock(wait bool) (l *DLock, err error) {
if !IsDebug {
m.mutex.Lock()
Expand Down Expand Up @@ -182,12 +174,6 @@ func (m *DLock) Lock(wait bool) error {
}
}

// Unlock unlocks m.
// It is a run-time error if m is not locked on entry to Unlock.
//
// A locked Mutex is not associated with a particular goroutine.
// It is allowed for one goroutine to lock a Mutex and then
// arrange for another goroutine to unlock it.
func (m *DLock) Unlock() (err error) {
opts := []registry.PluginOpOption{
registry.DEL,
Expand Down