build: upgrade to go 1.17 and dependencies

This commit is contained in:
2021-09-01 22:08:47 +02:00
parent ff5eaf37ec
commit 7f4c139364
432 changed files with 82316 additions and 106740 deletions

View File

@ -26,7 +26,7 @@ type ClientOptionsReader struct {
options *ClientOptions
}
//Servers returns a slice of the servers defined in the clientoptions
// Servers returns a slice of the servers defined in the clientoptions
func (r *ClientOptionsReader) Servers() []*url.URL {
s := make([]*url.URL, len(r.options.Servers))
@ -38,31 +38,31 @@ func (r *ClientOptionsReader) Servers() []*url.URL {
return s
}
//ResumeSubs returns true if resuming stored (un)sub is enabled
// ResumeSubs returns true if resuming stored (un)sub is enabled
func (r *ClientOptionsReader) ResumeSubs() bool {
s := r.options.ResumeSubs
return s
}
//ClientID returns the set client id
// ClientID returns the set client id
func (r *ClientOptionsReader) ClientID() string {
s := r.options.ClientID
return s
}
//Username returns the set username
// Username returns the set username
func (r *ClientOptionsReader) Username() string {
s := r.options.Username
return s
}
//Password returns the set password
// Password returns the set password
func (r *ClientOptionsReader) Password() string {
s := r.options.Password
return s
}
//CleanSession returns whether Cleansession is set
// CleanSession returns whether Cleansession is set
func (r *ClientOptionsReader) CleanSession() bool {
s := r.options.CleanSession
return s
@ -133,6 +133,18 @@ func (r *ClientOptionsReader) AutoReconnect() bool {
return s
}
// ConnectRetryInterval returns the delay between retries on the initial connection (if ConnectRetry true)
func (r *ClientOptionsReader) ConnectRetryInterval() time.Duration {
s := r.options.ConnectRetryInterval
return s
}
// ConnectRetry returns whether the initial connection request will be retried until connection established
func (r *ClientOptionsReader) ConnectRetry() bool {
s := r.options.ConnectRetry
return s
}
func (r *ClientOptionsReader) WriteTimeout() time.Duration {
s := r.options.WriteTimeout
return s
@ -147,3 +159,9 @@ func (r *ClientOptionsReader) HTTPHeaders() http.Header {
h := r.options.HTTPHeaders
return h
}
// WebsocketOptions returns the currently configured WebSocket options
func (r *ClientOptionsReader) WebsocketOptions() *WebsocketOptions {
s := r.options.WebsocketOptions
return s
}