Documentation
¶
Index ¶
Constants ¶
View Source
const ( Requester = SocketType("Requester") Replier = SocketType("Replier") Publisher = SocketType("Publisher") Subscriber = SocketType("Subscriber") ContextRequester = SocketType("ContextRequester") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
type ContextSocket ¶
type ContextSocket interface { Get() (ReadWriter, error) Close() error }
func GetContextSocket ¶
func GetContextSocket(ctx context.Context, s *Socket) (ContextSocket, error)
type NanomsgSocket ¶
type NanomsgSocket struct { SocketType SocketType `json:"socket_type"` Host string `json:"host"` Port int `json:"port"` Dial bool `json:"dial"` Listen bool `json:"listen"` RecvTimeout int `json:"recv_timeout"` SendTimeout int `json:"send_timeout"` // contains filtered or unexported fields }
NanomsgSocket containes a raw mangosSocket that is constructed during connection. Also contains various configuration patterns used for construction
func (*NanomsgSocket) Close ¶
func (s *NanomsgSocket) Close() error
func (*NanomsgSocket) Connect ¶
func (s *NanomsgSocket) Connect() error
Connect creates a socket based on the SocketType. setting timeouts if specified.
func (*NanomsgSocket) Get ¶
func (s *NanomsgSocket) Get() (ReadWriter, error)
OpenContext context socket can be used when duing parallel requests over a socket and wish to get responses back to match the request
type ReadWriter ¶
type Socket ¶
type Socket struct { Type SocketType `json:"type"` Host string `json:"host"` Port int `json:"port"` Listen bool `json:"listen"` Dial bool `json:"dial"` }
type SocketType ¶
type SocketType string
Click to show internal directories.
Click to hide internal directories.