Documentation
¶
Overview ¶
Package utils implements some common functionalities for channel
Index ¶
Constants ¶
View Source
const (
DefaultFileChannelPath = "channels"
)
Variables ¶
View Source
var ( TestAddress string = message.DefaultIPCPrefix + message.DefaultCoreAgentChannel + "testPipe" ErrorListenDial = "invoke listen or dial before this call" )
Functions ¶
func GetDefaultChannelPath ¶
func GetDefaultChannelPath(identity identity.IAgentIdentity, fileAddress string) (string, error)
GetDefaultChannelPath returns channel path
func IsDefaultChannelPresent ¶
func IsDefaultChannelPresent(identity identity.IAgentIdentity) bool
IsDefaultChannelPresent verifies whether the channel directory is present or not
Types ¶
type IFileChannelCommProtocol ¶
type IFileChannelCommProtocol interface { Initialize() Send(message *message.Message) error Close() error Recv() ([]byte, error) SetOption(name string, value interface{}) error Listen(addr string) error Dial(addr string) error GetCommProtocolInfo() SocketType }
IFileChannelCommProtocol interface is for implementing communication protocols
type SocketType ¶
type SocketType string
const ( Surveyor SocketType = "surveyor" Respondent SocketType = "respondent" )
Click to show internal directories.
Click to hide internal directories.