Documentation ¶
Index ¶
- Constants
- func RequireNoLeaks(t *testing.T, events *Events)
- type CreditEvent
- type DispositionEvent
- type DispositionType
- type Event
- type EventType
- type Events
- func (e *Events) All() []Event
- func (e *Events) Chan() <-chan Event
- func (e *Events) Clear()
- func (e *Events) CloseConnection(name string)
- func (e *Events) CloseLink(args LinkEvent)
- func (e *Events) Custom(name string, data any)
- func (e *Events) Disposition(args DispositionEvent)
- func (e *Events) GetOpenConns() []string
- func (e *Events) GetOpenLinks() []string
- func (e *Events) IssueCredit(args CreditEvent)
- func (e *Events) OpenConnection(name string)
- func (e *Events) OpenLink(args LinkEvent)
- func (e *Events) Receive(args ReceiveEvent)
- func (e *Events) Send(args SendEvent)
- type LinkEvent
- type LinkRole
- type MockConnection
- type MockData
- func (md *MockData) AllQueues() map[string]*Queue
- func (md *MockData) Close()
- func (md *MockData) DetachReceivers(entityName string)
- func (md *MockData) DetachSenders(entityName string)
- func (md *MockData) NewConnection(ctx context.Context) (amqpwrap.AMQPClient, error)
- func (md *MockData) NewReceiver(ctx context.Context, source string, opts *amqp.ReceiverOptions, ...) (amqpwrap.AMQPReceiverCloser, error)
- func (md *MockData) NewSender(ctx context.Context, target string, opts *amqp.SenderOptions, ...) (amqpwrap.AMQPSenderCloser, error)
- func (md *MockData) NewTokenProvider() auth.TokenProvider
- type MockDataOptions
- type MockReceiver
- type MockSender
- type MockSession
- type Operation
- type Queue
- func (q *Queue) AcceptMessage(ctx context.Context, msg *amqp.Message, evt LinkEvent, status *Status) error
- func (q *Queue) Close()
- func (q *Queue) IssueCredit(credit uint32, evt LinkEvent, status *Status) error
- func (q *Queue) ModifyMessage(ctx context.Context, msg *amqp.Message, options *amqp.ModifyMessageOptions, ...) error
- func (q *Queue) Receive(ctx context.Context, evt LinkEvent, status *Status) (*amqp.Message, error)
- func (q *Queue) RejectMessage(ctx context.Context, msg *amqp.Message, e *amqp.Error, evt LinkEvent, ...) error
- func (q *Queue) ReleaseMessage(ctx context.Context, msg *amqp.Message, evt LinkEvent) error
- func (q *Queue) Send(ctx context.Context, tempMsg *amqp.Message, evt LinkEvent, status *Status) error
- type ReceiveEvent
- type SendEvent
- type Status
Constants ¶
View Source
const (
EventEmulator azlog.Event = "emulator"
)
Variables ¶
This section is empty.
Functions ¶
func RequireNoLeaks ¶
Types ¶
type CreditEvent ¶
type DispositionEvent ¶
type DispositionEvent struct { LinkEvent DispType DispositionType *amqp.Message }
type DispositionType ¶
type DispositionType string
const ( DispositionTypeAccept DispositionType = "accept" DispositionTypeReject DispositionType = "reject" DispositionTypeRelease DispositionType = "release" )
type EventType ¶
type EventType string
const ( EventTypeConnOpen EventType = "conn-open" EventTypeConnClose EventType = "conn-close" EventTypeLinkOpen EventType = "link-attach" EventTypeLinkCredit EventType = "link-issue-credit" EventTypeLinkClose EventType = "link-detach" EventTypeLinkDisposition EventType = "link-disposition" EventTypeReceive EventType = "link-receive" EventTypeSend EventType = "link-send" )
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
func (*Events) CloseConnection ¶
func (*Events) Disposition ¶
func (e *Events) Disposition(args DispositionEvent)
func (*Events) GetOpenConns ¶
func (*Events) GetOpenLinks ¶
func (*Events) IssueCredit ¶
func (e *Events) IssueCredit(args CreditEvent)
func (*Events) OpenConnection ¶
func (*Events) Receive ¶
func (e *Events) Receive(args ReceiveEvent)
type MockConnection ¶
type MockConnection struct { Status *Status *mock.MockAMQPClient }
type MockData ¶
type MockData struct { Ctrl *gomock.Controller Events *Events // contains filtered or unexported fields }
func NewMockData ¶
func NewMockData(t *testing.T, options *MockDataOptions) *MockData
func (*MockData) DetachReceivers ¶
func (*MockData) DetachSenders ¶
func (*MockData) NewConnection ¶
func (*MockData) NewReceiver ¶
func (md *MockData) NewReceiver(ctx context.Context, source string, opts *amqp.ReceiverOptions, sess *MockSession) (amqpwrap.AMQPReceiverCloser, error)
func (*MockData) NewSender ¶
func (md *MockData) NewSender(ctx context.Context, target string, opts *amqp.SenderOptions, sess *MockSession) (amqpwrap.AMQPSenderCloser, error)
func (*MockData) NewTokenProvider ¶
func (md *MockData) NewTokenProvider() auth.TokenProvider
type MockDataOptions ¶
type MockDataOptions struct { NewConnectionFn func(orig *mock.MockAMQPClient, ctx context.Context) error // PreReceiverMock is called with the mock Receiver instance before we instrument it with // our defaults. PreReceiverMock func(mr *MockReceiver, ctx context.Context) error // PreSenderMock is called with the mock Sender instance before we instrument it with // our defaults. PreSenderMock func(ms *MockSender, ctx context.Context) error // PreSessionMock is called with the mock Session instance before we instrument it with // our defaults. PreSessionMock func(msess *MockSession, ctx context.Context, opts *amqp.SessionOptions) error }
type MockReceiver ¶
type MockReceiver struct { *mock.MockAMQPReceiverCloser Opts *amqp.ReceiverOptions Session *MockSession Source string Status *Status TargetAddress string InternalReceive func(ctx context.Context) (*amqp.Message, error) }
func (*MockReceiver) Done ¶
func (rcvr *MockReceiver) Done() <-chan error
func (*MockReceiver) LinkEvent ¶
func (rcvr *MockReceiver) LinkEvent() LinkEvent
type MockSender ¶
type MockSender struct { *mock.MockAMQPSenderCloser Opts *amqp.SenderOptions Session *MockSession Status *Status Target string }
func (*MockSender) LinkEvent ¶
func (m *MockSender) LinkEvent() LinkEvent
type MockSession ¶
type MockSession struct { Status *Status *mock.MockAMQPSession ID string Conn *MockConnection }
func (*MockSession) Done ¶
func (sess *MockSession) Done() <-chan error
type Operation ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) AcceptMessage ¶
func (*Queue) IssueCredit ¶
func (*Queue) ModifyMessage ¶
func (*Queue) RejectMessage ¶
func (*Queue) ReleaseMessage ¶
type ReceiveEvent ¶
type ReceiveEvent struct { LinkEvent *amqp.Message }
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
func (*Status) CloseWithError ¶
Click to show internal directories.
Click to hide internal directories.