當前位置: 首頁>>代碼示例>>Golang>>正文


Golang proton.Link類代碼示例

本文整理匯總了Golang中qpid/apache/org/proton.Link的典型用法代碼示例。如果您正苦於以下問題:Golang Link類的具體用法?Golang Link怎麽用?Golang Link使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Link類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: handleIncoming

func (c *connection) handleIncoming(sn *session, l proton.Link) {
	if l.IsReceiver() {
		c.incoming.In <- newReceiver(makeIncomingLink(sn, l))
	} else {
		c.incoming.In <- newSender(makeIncomingLink(sn, l))
	}
}
開發者ID:Karm,項目名稱:qpid-proton,代碼行數:7,代碼來源:connection.go

示例2: linkError

func (h *handler) linkError(l proton.Link, msg string) {
	proton.CloseError(l, amqp.Errorf(amqp.InternalError, "%s for %s %s", msg, l.Type(), l))
}
開發者ID:orpiske,項目名稱:qpid-proton,代碼行數:3,代碼來源:handler.go

示例3: makeIncomingLinkSettings

func makeIncomingLinkSettings(pLink proton.Link, sn *session) linkSettings {
	return linkSettings{
		isSender:  pLink.IsSender(),
		source:    pLink.RemoteSource().Address(),
		target:    pLink.RemoteTarget().Address(),
		linkName:  pLink.Name(),
		sndSettle: SndSettleMode(pLink.RemoteSndSettleMode()),
		rcvSettle: RcvSettleMode(pLink.RemoteRcvSettleMode()),
		capacity:  1,
		prefetch:  false,
		pLink:     pLink,
		session:   sn,
	}
}
開發者ID:orpiske,項目名稱:qpid-proton,代碼行數:14,代碼來源:link.go

示例4: makeIncomingLink

// Set up a link from an incoming proton.Link.
func makeIncomingLink(sn *session, eLink proton.Link) incomingLink {
	l := incomingLink{
		link: link{
			session:   sn,
			isSender:  eLink.IsSender(),
			eLink:     eLink,
			source:    eLink.RemoteSource().Address(),
			target:    eLink.RemoteTarget().Address(),
			linkName:  eLink.Name(),
			sndSettle: SndSettleMode(eLink.RemoteSndSettleMode()),
			rcvSettle: RcvSettleMode(eLink.RemoteRcvSettleMode()),
			capacity:  1,
			prefetch:  false,
			done:      make(chan struct{}),
		},
	}
	l.str = eLink.String()
	return l
}
開發者ID:b-cuts,項目名稱:qpid-proton,代碼行數:20,代碼來源:link.go

示例5: makeIncomingLink

// initIncoming sets link settings from an incoming proton.Link.
// Call in proton goroutine
func makeIncomingLink(sn *session, eLink proton.Link) link {
	l := link{
		session:  sn,
		isSender: eLink.IsSender(),
		eLink:    eLink,
		settings: LinkSettings{
			Source:        eLink.RemoteSource().Address(),
			Target:        eLink.RemoteTarget().Address(),
			Name:          eLink.Name(),
			SndSettleMode: SndSettleMode(eLink.RemoteSndSettleMode()),
			RcvSettleMode: RcvSettleMode(eLink.RemoteRcvSettleMode()),
		},
	}
	l.setSettings()
	return l
}
開發者ID:Karm,項目名稱:qpid-proton,代碼行數:18,代碼來源:link.go

示例6: makeIncomingLink

// Set up a link from an incoming proton.Link.
func makeIncomingLink(sn *session, eLink proton.Link) incomingLink {
	l := incomingLink{
		incoming: makeIncoming(eLink),
		linkSettings: linkSettings{
			isSender:  eLink.IsSender(),
			source:    eLink.RemoteSource().Address(),
			target:    eLink.RemoteTarget().Address(),
			linkName:  eLink.Name(),
			sndSettle: SndSettleMode(eLink.RemoteSndSettleMode()),
			rcvSettle: RcvSettleMode(eLink.RemoteRcvSettleMode()),
			capacity:  1,
			prefetch:  false,
			eLink:     eLink,
			session:   sn,
		},
	}
	return l
}
開發者ID:marcelmeulemans,項目名稱:qpid-proton-1,代碼行數:19,代碼來源:link.go


注:本文中的qpid/apache/org/proton.Link類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。