Documentation ¶
Index ¶
- func FillStruct(s interface{}, m map[string]interface{}) error
- func LoadNodeID(filePath string) (string, error)
- func NewError(severity SwanErrorSeverity, err interface{}) error
- func SetField(obj interface{}, name string, value interface{}) error
- func SliceContains(slice []string, value string) bool
- func SliceUnique(slice []string) bool
- type SortableNodePath
- type SwanError
- type SwanErrorSeverity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillStruct ¶ added in v0.1.9
func LoadNodeID ¶ added in v0.1.7
LoadNodeID load or create id in local id file
func NewError ¶ added in v0.1.7
func NewError(severity SwanErrorSeverity, err interface{}) error
func SliceContains ¶
func SliceUnique ¶
Types ¶
type SortableNodePath ¶ added in v0.1.11
type SortableNodePath []string
example node path => /swan/leader-election/_c_c7b2927d40ec05db4d199a804437995c-node0000000023 sortable value is node0000000023
func (SortableNodePath) Len ¶ added in v0.1.11
func (a SortableNodePath) Len() int
func (SortableNodePath) Less ¶ added in v0.1.11
func (a SortableNodePath) Less(i, j int) bool
func (SortableNodePath) Swap ¶ added in v0.1.11
func (a SortableNodePath) Swap(i, j int)
type SwanError ¶ added in v0.1.7
type SwanError struct { Severity SwanErrorSeverity `json:"Severity"` Err string `json:"Err"` }
type SwanErrorSeverity ¶ added in v0.1.7
type SwanErrorSeverity int
const ( SeverityLow SwanErrorSeverity = iota SeverityMiddle SeverityHigh )
Click to show internal directories.
Click to hide internal directories.