go-nats-streaming clientID

This commit is contained in:
Yumin Wu 2019-04-26 16:34:46 +08:00 committed by Vasiliy Tolstov
parent 8d0a3fba24
commit 5e260a4cfa

View File

@ -22,6 +22,13 @@ func ClusterID(clusterID string) broker.Option {
return setBrokerOption(clusterIDKey{}, clusterID) 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{} type subscribeOptionKey struct{}
func SubscribeOption(opts ...stan.SubscriptionOption) broker.SubscribeOption { func SubscribeOption(opts ...stan.SubscriptionOption) broker.SubscribeOption {