mirror of
https://github.com/fhmq/hmq.git
synced 2026-08-29 22:13:11 +00:00
Update Support Go version (#143)
This commit is contained in:
@@ -8,7 +8,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
goversion: [ 1.15, 1.16, 1.17 ]
|
goversion: [ 1.17 ]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// special pub topic for cluster info BrokerInfoTopic
|
// BrokerInfoTopic special pub topic for cluster info
|
||||||
BrokerInfoTopic = "broker000100101info"
|
BrokerInfoTopic = "broker000100101info"
|
||||||
// CLIENT is an end user.
|
// CLIENT is an end user.
|
||||||
CLIENT = 0
|
CLIENT = 0
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ func (this *memTopics) Unsubscribe(topic []byte, sub interface{}) error {
|
|||||||
return this.sroot.sremove(topic, sub)
|
return this.sroot.sremove(topic, sub)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returned values will be invalidated by the next Subscribers call
|
// Subscribers Returned values will be invalidated by the next Subscribers call
|
||||||
func (this *memTopics) Subscribers(topic []byte, qos byte, subs *[]interface{}, qoss *[]byte) error {
|
func (this *memTopics) Subscribers(topic []byte, qos byte, subs *[]interface{}, qoss *[]byte) error {
|
||||||
if !ValidQos(qos) {
|
if !ValidQos(qos) {
|
||||||
return fmt.Errorf("Invalid QoS %d", qos)
|
return fmt.Errorf("Invalid QoS %d", qos)
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ func AclConfigLoad(file string) (*ACLConfig, error) {
|
|||||||
File: file,
|
File: file,
|
||||||
Info: make([]*AuthInfo, 0, 4),
|
Info: make([]*AuthInfo, 0, 4),
|
||||||
}
|
}
|
||||||
err := aclconifg.Prase()
|
err := aclconifg.Parse()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return aclconifg, err
|
return aclconifg, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ACLConfig) Prase() error {
|
func (c *ACLConfig) Parse() error {
|
||||||
f, err := os.Open(c.File)
|
f, err := os.Open(c.File)
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func Init() *authHTTP {
|
|||||||
return &authHTTP{client: httpClient}
|
return &authHTTP{client: httpClient}
|
||||||
}
|
}
|
||||||
|
|
||||||
//CheckAuth check mqtt connect
|
// CheckConnect check mqtt connect
|
||||||
func (a *authHTTP) CheckConnect(clientID, username, password string) bool {
|
func (a *authHTTP) CheckConnect(clientID, username, password string) bool {
|
||||||
action := "connect"
|
action := "connect"
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user