Skip to content

Commit

Permalink
Remove tracer bits for now
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel committed Jun 16, 2016
1 parent 35a5e3b commit e64db45
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 198 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Native Go Zookeeper Client Library
===================================

[![Build Status](https://travis-ci.org/samuel/go-zookeeper.png)](https://travis-ci.org/samuel/go-zookeeper)
[![Coverage Status](https://coveralls.io/repos/github/samuel/go-zookeeper/badge.svg?branch=master)](https://coveralls.io/github/samuel/go-zookeeper?branch=master)

Documentation: http://godoc.org/github.com/samuel/go-zookeeper/zk

Expand Down
9 changes: 0 additions & 9 deletions tracer/main.go

This file was deleted.

3 changes: 2 additions & 1 deletion zk/dnshostprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (hp *DNSHostProvider) Init(servers []string) error {
return nil
}

// Len returns the number of servers available
func (hp *DNSHostProvider) Len() int {
hp.mu.Lock()
defer hp.mu.Unlock()
Expand All @@ -79,7 +80,7 @@ func (hp *DNSHostProvider) Next() (server string, retryStart bool) {
return hp.servers[hp.curr], retryStart
}

// Notify the HostProvider of a successful connection.
// Connected notifies the HostProvider of a successful connection.
func (hp *DNSHostProvider) Connected() {
hp.mu.Lock()
defer hp.mu.Unlock()
Expand Down
40 changes: 0 additions & 40 deletions zk/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,43 +598,3 @@ func requestStructForOp(op int32) interface{} {
}
return nil
}

func responseStructForOp(op int32) interface{} {
switch op {
case opClose:
return &closeResponse{}
case opCreate:
return &createResponse{}
case opDelete:
return &deleteResponse{}
case opExists:
return &existsResponse{}
case opGetAcl:
return &getAclResponse{}
case opGetChildren:
return &getChildrenResponse{}
case opGetChildren2:
return &getChildren2Response{}
case opGetData:
return &getDataResponse{}
case opPing:
return &pingResponse{}
case opSetAcl:
return &setAclResponse{}
case opSetData:
return &setDataResponse{}
case opSetWatches:
return &setWatchesResponse{}
case opSync:
return &syncResponse{}
case opWatcherEvent:
return &watcherEvent{}
case opSetAuth:
return &setAuthResponse{}
// case opCheck:
// return &checkVersionResponse{}
case opMulti:
return &multiResponse{}
}
return nil
}
10 changes: 10 additions & 0 deletions zk/structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ func TestEncodeDecodePacket(t *testing.T) {
encodeDecodeTest(t, &multiRequest{Ops: []multiRequestOp{{multiHeader{opCheck, false, -1}, &CheckVersionRequest{"/", -1}}}})
}

func TestRequestStructForOp(t *testing.T) {
for op, name := range opNames {
if op != opNotify && op != opWatcherEvent {
if s := requestStructForOp(op); s == nil {
t.Errorf("No struct for op %s", name)
}
}
}
}

func encodeDecodeTest(t *testing.T, r interface{}) {
buf := make([]byte, 1024)
n, err := encodePacket(buf, r)
Expand Down
148 changes: 0 additions & 148 deletions zk/tracer.go

This file was deleted.

0 comments on commit e64db45

Please sign in to comment.