Skip to content

Commit

Permalink
additional comments for config
Browse files Browse the repository at this point in the history
  • Loading branch information
raskle committed Apr 25, 2017
1 parent 3972d0c commit 66496a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (c *Cluster) NodeStates() map[string]string {
return h
}

// State returns the internal ClusterState representation.
// Status returns the internal ClusterState representation.
func (c *Cluster) Status() *internal.ClusterStatus {
return &internal.ClusterStatus{
Nodes: encodeClusterStatus(c.Nodes),
Expand Down
15 changes: 11 additions & 4 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ package pilosa
import "time"

const (
// DefaultHost is the default hostname and port to use.
DefaultHost = "localhost"
DefaultPort = "10101"
DefaultClusterType = "static"
// DefaultHost is the default hostname to use.
DefaultHost = "localhost"

// DefaultPort is the default port use with the hostname.
DefaultPort = "10101"

// DefaultClusterType sets the node intercommunication method
DefaultClusterType = "static"

// DefaultInternalPort the port the nodes intercommunicate on
DefaultInternalPort = "14000"
)

Expand Down Expand Up @@ -67,6 +73,7 @@ func (d *Duration) UnmarshalText(text []byte) error {
return nil
}

// MarshalText writes duration value in text format.
func (d Duration) MarshalText() (text []byte, err error) {
return []byte(d.String()), nil
}

0 comments on commit 66496a7

Please sign in to comment.