Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Miner support MQTT protocol #357

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Conversation

laodouya
Copy link
Member

No description provided.

@laodouya laodouya changed the title [WIP] Feature/miner mqtt [WIP] Miner support MQTT protocol Jun 21, 2019
@@ -106,6 +106,14 @@ type DNSSeed struct {
BPCount int `yaml:"BPCount"`
}

type MQTTBrokerInfo struct {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported type MQTTBrokerInfo should have comment or be unexported

@@ -1020,6 +1020,10 @@ func (c *Chain) AddResponse(resp *types.SignedResponseHeader) (err error) {
return c.ai.addResponse(c.rt.getHeightFromTime(resp.GetRequestTimestamp()), resp)
}

func (c *Chain) GetPeerLeaderID() proto.NodeID {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported method Chain.GetPeerLeaderID should have comment or be unexported

"github.com/gogf/gf/g/container/gqueue"
)

type MQTTAPI string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported type MQTTAPI should have comment or be unexported

type MQTTAPI string

const (
//Publish API

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
comment on exported const MQTTNewest should be of the form "MQTTNewest ..."

const (
//Publish API
MQTTNewest MQTTAPI = "newest"
DSNList MQTTAPI = "dsnlist"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported const DSNList should have comment (or a comment on this block) or be unexported

type SubscribeEvent struct {
ClientID proto.NodeID
DatabaseID proto.DatabaseID
ApiName MQTTAPI

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
struct field ApiName should be APIName

Payload BrokerPayload
}

type MQTTClient struct {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported type MQTTClient should have comment or be unexported

return dests
}

func NewMQTTClient(config *conf.MQTTBrokerInfo, dbms *DBMS) (c *MQTTClient) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported function NewMQTTClient should have comment or be unexported

}
}

func (c *MQTTClient) PublishDSN(apiName MQTTAPI, databaseID proto.DatabaseID, payload BrokerPayload, requestClient proto.NodeID) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported method MQTTClient.PublishDSN should have comment or be unexported

return nil
}

func (c *MQTTClient) Close() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golint] reported by reviewdog 🐶
exported method MQTTClient.Close should have comment or be unexported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants