From 5e260a4cfa6f4c20ec72beab85b1db1a028a5966 Mon Sep 17 00:00:00 2001 From: Yumin Wu Date: Fri, 26 Apr 2019 16:34:46 +0800 Subject: [PATCH] go-nats-streaming clientID --- options.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/options.go b/options.go index 43f0bb9..137587e 100644 --- a/options.go +++ b/options.go @@ -22,6 +22,13 @@ func ClusterID(clusterID string) broker.Option { return setBrokerOption(clusterIDKey{}, clusterID) } +type clientIDKey struct{} + +// ClientID specify client id to connect +func ClientID(clientID string) broker.Option { + return setBrokerOption(clientIDKey{}, clientID) +} + type subscribeOptionKey struct{} func SubscribeOption(opts ...stan.SubscriptionOption) broker.SubscribeOption {