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

Adding isClosed method #61

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Features:
## Usage Instructions

```
go get github.com/go-stomp/stomp
go get github.com/ingelectus/stomp
```

For API documentation, see http://godoc.org/github.com/go-stomp/stomp
For API documentation, see http://godoc.org/github.com/ingelectus/stomp

## Previous Version

Expand Down
2 changes: 1 addition & 1 deletion ack.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// The AckMode type is an enumeration of the acknowledgement modes for a
Expand Down
12 changes: 6 additions & 6 deletions breaking_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
Version 2:
```go
import (
"github.com/go-stomp/stomp"
"github.com/ingelectus/stomp"
)
```

Expand All @@ -46,11 +46,11 @@ package, and the types moved are not needed in normal usage of the `stomp` packa
Version 2 of the stomp library makes use of functional options to provide a clean, flexible way
of specifying options in the following API calls:

* [Dial()](http://godoc.org/github.com/go-stomp/stomp#Dial)
* [Connect()](http://godoc.org/github.com/go-stomp/stomp#Connect)
* [Conn.Send()](http://godoc.org/github.com/go-stomp/stomp#Conn.Send)
* [Transaction.Send()](http://godoc.org/github.com/go-stomp/stomp#Transaction.Send)
* [Conn.Subscribe()](http://godoc.org/github.com/go-stomp/stomp#Conn.Subscribe)
* [Dial()](http://godoc.org/github.com/ingelectus/stomp#Dial)
* [Connect()](http://godoc.org/github.com/ingelectus/stomp#Connect)
* [Conn.Send()](http://godoc.org/github.com/ingelectus/stomp#Conn.Send)
* [Transaction.Send()](http://godoc.org/github.com/ingelectus/stomp#Transaction.Send)
* [Conn.Subscribe()](http://godoc.org/github.com/ingelectus/stomp#Conn.Subscribe)

The idea for this comes from Dave Cheney's very excellent blog post,
[Functional Options for Friendly APIs](http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis).
Expand Down
7 changes: 6 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// Default time span to add to read/write heart-beat timeouts
Expand Down Expand Up @@ -683,3 +683,8 @@ func (c *Conn) createAckNackFrame(msg *Message, ack bool) (*frame.Frame, error)

return f, nil
}

// IsClosed checks if active stomp connection is closed
func (c *Conn) IsClosed() bool {
return c.closed
}
2 changes: 1 addition & 1 deletion conn_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"time"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// ConnOptions is an opaque structure used to collection options
Expand Down
4 changes: 2 additions & 2 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"io"
"time"

"github.com/go-stomp/stomp/frame"
"github.com/go-stomp/stomp/testutil"
"github.com/ingelectus/stomp/frame"
"github.com/ingelectus/stomp/testutil"
. "gopkg.in/check.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// Error values
Expand Down
4 changes: 2 additions & 2 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net"
"time"

"github.com/go-stomp/stomp"
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp"
"github.com/ingelectus/stomp/frame"
)

func ExampleConn_Send(c *stomp.Conn) error {
Expand Down
2 changes: 1 addition & 1 deletion examples/client_test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/go-stomp/stomp"
"github.com/ingelectus/stomp"
)

const defaultPort = ":61613"
Expand Down
2 changes: 1 addition & 1 deletion message.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// A Message represents a message received from the STOMP server.
Expand Down
2 changes: 1 addition & 1 deletion send_options.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// SendOpt contains options for for the Conn.Send and Transaction.Send functions.
Expand Down
4 changes: 2 additions & 2 deletions server/client/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strconv"
"time"

"github.com/go-stomp/stomp"
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp"
"github.com/ingelectus/stomp/frame"
)

// Maximum number of pending frames allowed to a client.
Expand Down
4 changes: 2 additions & 2 deletions server/client/frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"strings"

"github.com/go-stomp/stomp"
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp"
"github.com/ingelectus/stomp/frame"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions server/client/frame_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package client

import (
"github.com/go-stomp/stomp"
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp"
"github.com/ingelectus/stomp/frame"
. "gopkg.in/check.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion server/client/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"strconv"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// Opcode used in client requests.
Expand Down
2 changes: 1 addition & 1 deletion server/client/subscription.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

type Subscription struct {
Expand Down
2 changes: 1 addition & 1 deletion server/client/tx_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package client
import (
"container/list"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

type txStore struct {
Expand Down
2 changes: 1 addition & 1 deletion server/client/tx_store_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package client

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
. "gopkg.in/check.v1"
)

Expand Down
8 changes: 4 additions & 4 deletions server/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"strings"
"time"

"github.com/go-stomp/stomp/frame"
"github.com/go-stomp/stomp/server/client"
"github.com/go-stomp/stomp/server/queue"
"github.com/go-stomp/stomp/server/topic"
"github.com/ingelectus/stomp/frame"
"github.com/ingelectus/stomp/server/client"
"github.com/ingelectus/stomp/server/queue"
"github.com/ingelectus/stomp/server/topic"
)

type requestProcessor struct {
Expand Down
2 changes: 1 addition & 1 deletion server/queue/memory_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package queue
import (
"container/list"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// In-memory implementation of the QueueStorage interface.
Expand Down
2 changes: 1 addition & 1 deletion server/queue/memory_queue_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package queue

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
. "gopkg.in/check.v1"
)

Expand Down
4 changes: 2 additions & 2 deletions server/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Package queue provides implementations of server-side queues.
package queue

import (
"github.com/go-stomp/stomp/frame"
"github.com/go-stomp/stomp/server/client"
"github.com/ingelectus/stomp/frame"
"github.com/ingelectus/stomp/server/client"
)

// Queue for storing message frames.
Expand Down
2 changes: 1 addition & 1 deletion server/queue/storage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package queue

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// Interface for queue storage. The intent is that
Expand Down
2 changes: 1 addition & 1 deletion server/queue_storage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package server

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// QueueStorage is an interface that abstracts the queue storage mechanism.
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"runtime"
"testing"

"github.com/go-stomp/stomp"
"github.com/ingelectus/stomp"
. "gopkg.in/check.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion server/topic/subscription.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package topic

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// Subscription is the interface that wraps a subscriber to a topic.
Expand Down
2 changes: 1 addition & 1 deletion server/topic/topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package topic
import (
"container/list"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// A Topic is used for broadcasting to subscribed clients.
Expand Down
2 changes: 1 addition & 1 deletion server/topic/topic_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package topic

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
. "gopkg.in/check.v1"
)

Expand Down
2 changes: 1 addition & 1 deletion stomp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Disconnect method. This will perform a graceful shutdown sequence as specified i

Source code and other details for the project are available at GitHub:

https://github.com/go-stomp/stomp
https://github.com/ingelectus/stomp

*/
package stomp
2 changes: 1 addition & 1 deletion stompd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"net"
"os"

"github.com/go-stomp/stomp/server"
"github.com/ingelectus/stomp/server"
)

// TODO: experimenting with ways to gracefully shutdown the server,
Expand Down
2 changes: 1 addition & 1 deletion subscribe_options.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// SubscribeOpt contains options for for the Conn.Subscribe function.
Expand Down
2 changes: 1 addition & 1 deletion subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"sync/atomic"

"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion transaction.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// A Transaction applies to the sending of messages to the STOMP server,
Expand Down
2 changes: 1 addition & 1 deletion validator.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stomp

import (
"github.com/go-stomp/stomp/frame"
"github.com/ingelectus/stomp/frame"
)

// Validator is an interface for validating STOMP frames.
Expand Down
2 changes: 1 addition & 1 deletion version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package stomp_test
import (
"testing"

"github.com/go-stomp/stomp"
"github.com/ingelectus/stomp"
)

func TestSupportsNack(t *testing.T) {
Expand Down