remote

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2015 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

masterとの通信処理パッケージ

Index

Constants

View Source
const MsgEnd = "\n"

送受信メッセージの終端文字

Variables

This section is empty.

Functions

func StartReceive

func StartReceive(bindAddr string, port int, multi int) (<-chan *Session, error)

引数で指定したbind用のアドレスとポート番号portを指定してメッセージの受信待ちを開始する。 受信したメッセージは戻り値のchan stringに順番に挿入されていく。 引数で指定した多重度でチャネルを作成する。

引数:bindAddr バインドアドレス

引数:port Listenポート番号

引数:multi メッセージ受信の多重度

戻り値:メッセージ受信を通知する、受信チャネル

戻り値:エラー情報

Types

type Session

type Session struct {
	Conn net.Conn
	Body string
	// contains filtered or unexported fields
}

masterからのジョブ実行要求1つに対応する構造体。

func NewSession

func NewSession(conn net.Conn, body string) *Session

Sessionオブジェクトのコンストラクタ

func (*Session) Do

func (s *Session) Do(conf *config.ServantConfig) error

セッションに対応した処理を実行する。 引数:conf 設定情報 戻り値:なし

Jump to

Keyboard shortcuts

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