graph

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncMsgType        = "Sync"
	SyncRequestMsgType = "SyncRequest"
	SyncReplyMsgType   = "SyncReply"
	NodeUpdatedMsgType = "NodeUpdated"
	NodeDeletedMsgType = "NodeDeleted"
	NodeAddedMsgType   = "NodeAdded"
	EdgeUpdatedMsgType = "EdgeUpdated"
	EdgeDeletedMsgType = "EdgeDeleted"
	EdgeAddedMsgType   = "EdgeAdded"
)

Graph message type

View Source
const (
	// Namespace used for WebSocket message
	Namespace = "Graph"
)

Variables

View Source
var (
	ErrSyncRequestMalFormed = errors.New("SyncRequestMsg malformed")
	ErrSyncMsgMalFormed     = errors.New("SyncMsg/SyncReplyMsg malformed")
)

Graph error message

Functions

func NewStructMessage

func NewStructMessage(typ string, i interface{}) *ws.StructMessage

NewStructMessage returns a new graffiti websocket StructMessage

func UnmarshalMessage

func UnmarshalMessage(msg *ws.StructMessage) (string, interface{}, error)

UnmarshalMessage unmarshal graph message

Types

type SyncMsg

type SyncMsg struct {
	*graph.Elements
}

SyncMsg describes graph synchro message

type SyncRequestMsg

type SyncRequestMsg struct {
	graph.Context
	GremlinFilter string
}

SyncRequestMsg describes a graph synchro request message

func (*SyncRequestMsg) UnmarshalJSON

func (s *SyncRequestMsg) UnmarshalJSON(b []byte) error

UnmarshalJSON custom unmarshal function

Source Files

  • message.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL