fix: remove own types
This commit is contained in:
parent
15e6c19222
commit
e8cba551c7
11
nacl.go
11
nacl.go
@ -16,13 +16,6 @@ var (
|
|||||||
stanLock = sync.Mutex{}
|
stanLock = sync.Mutex{}
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
|
||||||
Msg = stan.Msg
|
|
||||||
NatsMsg = nats.Msg
|
|
||||||
Subscription = stan.Subscription
|
|
||||||
NatsSubscription = nats.Subscription
|
|
||||||
)
|
|
||||||
|
|
||||||
func SetupNatsWithCreds(host string, port int, credsFile string, closeHandler *grawt.CloseHandler) error {
|
func SetupNatsWithCreds(host string, port int, credsFile string, closeHandler *grawt.CloseHandler) error {
|
||||||
natsLock.Lock()
|
natsLock.Lock()
|
||||||
defer natsLock.Unlock()
|
defer natsLock.Unlock()
|
||||||
@ -98,7 +91,7 @@ func SetupStan(clusterName string, clientId string, host string, port int, user
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func FinalizeStan(subscriptions *[]Subscription) error {
|
func FinalizeStan(subscriptions *[]stan.Subscription) error {
|
||||||
stanLock.Lock()
|
stanLock.Lock()
|
||||||
defer stanLock.Unlock()
|
defer stanLock.Unlock()
|
||||||
if StanClient == nil {
|
if StanClient == nil {
|
||||||
@ -118,7 +111,7 @@ func FinalizeStan(subscriptions *[]Subscription) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func FinalizeNats(subscriptions *[]*NatsSubscription) error {
|
func FinalizeNats(subscriptions *[]*nats.Subscription) error {
|
||||||
natsLock.Lock()
|
natsLock.Lock()
|
||||||
defer natsLock.Unlock()
|
defer natsLock.Unlock()
|
||||||
if NatsClient == nil {
|
if NatsClient == nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user