client

package
v0.0.0-...-7ce1ab0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAuthExpired

type AccountAuthExpired struct {
	// contains filtered or unexported fields
}

func (AccountAuthExpired) Error

func (e AccountAuthExpired) Error() string

type AuthExpired

type AuthExpired struct {
	// contains filtered or unexported fields
}

func (AuthExpired) Error

func (e AuthExpired) Error() string

type AuthRevoked

type AuthRevoked struct {
	// contains filtered or unexported fields
}

func (AuthRevoked) Error

func (e AuthRevoked) Error() string

type Authorization

type Authorization struct {
	// contains filtered or unexported fields
}

func (Authorization) Error

func (e Authorization) Error() string

type BadHeaderMsg

type BadHeaderMsg struct {
	// contains filtered or unexported fields
}

func (BadHeaderMsg) Error

func (e BadHeaderMsg) Error() string

type BadQueueName

type BadQueueName struct {
	// contains filtered or unexported fields
}

func (BadQueueName) Error

func (e BadQueueName) Error() string

type BadSubject

type BadSubject struct {
	// contains filtered or unexported fields
}

func (BadSubject) Error

func (e BadSubject) Error() string

type BadSubscription

type BadSubscription struct {
	// contains filtered or unexported fields
}

func (BadSubscription) Error

func (e BadSubscription) Error() string

type BadTimeout

type BadTimeout struct {
	// contains filtered or unexported fields
}

func (BadTimeout) Error

func (e BadTimeout) Error() string

type ChanArg

type ChanArg struct {
	// contains filtered or unexported fields
}

func (ChanArg) Error

func (e ChanArg) Error() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(log *zap.SugaredLogger, url, name string, maxReconnects int) *Client

New - return new 'NATS' client for rpc and broadcast notifications

func (Client) Close

func (c Client) Close()

Close - closes connection

func (*Client) Publish

func (c *Client) Publish(ctx context.Context, subject string, value interface{}) (err error)

Publish - for notify subscribers

use handle: func(context.Context,*struct)error

func (*Client) Request

func (c *Client) Request(ctx context.Context, subject string, request, response interface{}) (err error)

Request - a remote procedure call is created

use handle: func(context.Context,*struct)(*struct,error)

func (*Client) Subscribe

func (c *Client) Subscribe(subject string, handle interface{}) (Subscription, error)

Subscribe - subscribe handle for remote call or notify

use handle:

for rpc:    func(context.Context,*struct)(*struct,error)
for notify: func(context.Context,*struct)(error)

func (*Client) Unsubscribe

func (c *Client) Unsubscribe(sub Subscription) (err error)

Unsubscribe - delete subscription

type ClientIDNotSupported

type ClientIDNotSupported struct {
	// contains filtered or unexported fields
}

func (ClientIDNotSupported) Error

func (e ClientIDNotSupported) Error() string

type ClientIPNotSupported

type ClientIPNotSupported struct {
	// contains filtered or unexported fields
}

func (ClientIPNotSupported) Error

func (e ClientIPNotSupported) Error() string

type ConnectionClosed

type ConnectionClosed struct {
	// contains filtered or unexported fields
}

func (ConnectionClosed) Error

func (e ConnectionClosed) Error() string

type ConnectionDraining

type ConnectionDraining struct {
	// contains filtered or unexported fields
}

func (ConnectionDraining) Error

func (e ConnectionDraining) Error() string

type ConnectionReconnecting

type ConnectionReconnecting struct {
	// contains filtered or unexported fields
}

func (ConnectionReconnecting) Error

func (e ConnectionReconnecting) Error() string

type ConsumerConfigRequired

type ConsumerConfigRequired struct {
	// contains filtered or unexported fields
}

func (ConsumerConfigRequired) Error

func (e ConsumerConfigRequired) Error() string

type ConsumerNameRequired

type ConsumerNameRequired struct {
	// contains filtered or unexported fields
}

func (ConsumerNameRequired) Error

func (e ConsumerNameRequired) Error() string

type ConsumerNotActive

type ConsumerNotActive struct {
	// contains filtered or unexported fields
}

func (ConsumerNotActive) Error

func (e ConsumerNotActive) Error() string

type ConsumerNotFound

type ConsumerNotFound struct {
	// contains filtered or unexported fields
}

func (ConsumerNotFound) Error

func (e ConsumerNotFound) Error() string

type ContextAndTimeout

type ContextAndTimeout struct {
	// contains filtered or unexported fields
}

func (ContextAndTimeout) Error

func (e ContextAndTimeout) Error() string

type DeliverSubjectRequired

type DeliverSubjectRequired struct {
	// contains filtered or unexported fields
}

func (DeliverSubjectRequired) Error

func (e DeliverSubjectRequired) Error() string

type Disconnected

type Disconnected struct {
	// contains filtered or unexported fields
}

func (Disconnected) Error

func (e Disconnected) Error() string

type DrainTimeout

type DrainTimeout struct {
	// contains filtered or unexported fields
}

func (DrainTimeout) Error

func (e DrainTimeout) Error() string

type ErrorDTO

type ErrorDTO struct {
	Type    *string
	Message *string
}

func (ErrorDTO) Error

func (e ErrorDTO) Error() string

type HeadersNotSupported

type HeadersNotSupported struct {
	// contains filtered or unexported fields
}

func (HeadersNotSupported) Error

func (e HeadersNotSupported) Error() string

type InvalidArg

type InvalidArg struct {
	// contains filtered or unexported fields
}

func (InvalidArg) Error

func (e InvalidArg) Error() string

type InvalidConnection

type InvalidConnection struct {
	// contains filtered or unexported fields
}

func (InvalidConnection) Error

func (e InvalidConnection) Error() string

type InvalidContext

type InvalidContext struct {
	// contains filtered or unexported fields
}

func (InvalidContext) Error

func (e InvalidContext) Error() string

type InvalidDurableName

type InvalidDurableName struct {
	// contains filtered or unexported fields
}

func (InvalidDurableName) Error

func (e InvalidDurableName) Error() string

type InvalidJSAck

type InvalidJSAck struct {
	// contains filtered or unexported fields
}

func (InvalidJSAck) Error

func (e InvalidJSAck) Error() string

type InvalidMsg

type InvalidMsg struct {
	// contains filtered or unexported fields
}

func (InvalidMsg) Error

func (e InvalidMsg) Error() string

type InvalidStreamName

type InvalidStreamName struct {
	// contains filtered or unexported fields
}

func (InvalidStreamName) Error

func (e InvalidStreamName) Error() string

type JetStreamBadPre

type JetStreamBadPre struct {
	// contains filtered or unexported fields
}

func (JetStreamBadPre) Error

func (e JetStreamBadPre) Error() string

type JetStreamNotEnabled

type JetStreamNotEnabled struct {
	// contains filtered or unexported fields
}

func (JetStreamNotEnabled) Error

func (e JetStreamNotEnabled) Error() string

type JsonParse

type JsonParse struct {
	// contains filtered or unexported fields
}

func (JsonParse) Error

func (e JsonParse) Error() string

type MaxMessages

type MaxMessages struct {
	// contains filtered or unexported fields
}

func (MaxMessages) Error

func (e MaxMessages) Error() string

type MaxPayload

type MaxPayload struct {
	// contains filtered or unexported fields
}

func (MaxPayload) Error

func (e MaxPayload) Error() string

type MsgNoReply

type MsgNoReply struct {
	// contains filtered or unexported fields
}

func (MsgNoReply) Error

func (e MsgNoReply) Error() string

type MsgNotBound

type MsgNotBound struct {
	// contains filtered or unexported fields
}

func (MsgNotBound) Error

func (e MsgNotBound) Error() string

type MsgNotFound

type MsgNotFound struct {
	// contains filtered or unexported fields
}

func (MsgNotFound) Error

func (e MsgNotFound) Error() string

type MultiStreamUnsupported

type MultiStreamUnsupported struct {
	// contains filtered or unexported fields
}

func (MultiStreamUnsupported) Error

func (e MultiStreamUnsupported) Error() string

type MultipleTLSConfigs

type MultipleTLSConfigs struct {
	// contains filtered or unexported fields
}

func (MultipleTLSConfigs) Error

func (e MultipleTLSConfigs) Error() string

type NkeyAndUser

type NkeyAndUser struct {
	// contains filtered or unexported fields
}

func (NkeyAndUser) Error

func (e NkeyAndUser) Error() string

type NkeyButNoSigCB

type NkeyButNoSigCB struct {
	// contains filtered or unexported fields
}

func (NkeyButNoSigCB) Error

func (e NkeyButNoSigCB) Error() string

type NkeysNotSupported

type NkeysNotSupported struct {
	// contains filtered or unexported fields
}

func (NkeysNotSupported) Error

func (e NkeysNotSupported) Error() string

type NoContextOrTimeout

type NoContextOrTimeout struct {
	// contains filtered or unexported fields
}

func (NoContextOrTimeout) Error

func (e NoContextOrTimeout) Error() string

type NoDeadlineContext

type NoDeadlineContext struct {
	// contains filtered or unexported fields
}

func (NoDeadlineContext) Error

func (e NoDeadlineContext) Error() string

type NoEchoNotSupported

type NoEchoNotSupported struct {
	// contains filtered or unexported fields
}

func (NoEchoNotSupported) Error

func (e NoEchoNotSupported) Error() string

type NoInfoReceived

type NoInfoReceived struct {
	// contains filtered or unexported fields
}

func (NoInfoReceived) Error

func (e NoInfoReceived) Error() string

type NoMatchingStream

type NoMatchingStream struct {
	// contains filtered or unexported fields
}

func (NoMatchingStream) Error

func (e NoMatchingStream) Error() string

type NoResponders

type NoResponders struct {
	// contains filtered or unexported fields
}

func (NoResponders) Error

func (e NoResponders) Error() string

type NoServers

type NoServers struct {
	// contains filtered or unexported fields
}

func (NoServers) Error

func (e NoServers) Error() string

type NoStreamResponse

type NoStreamResponse struct {
	// contains filtered or unexported fields
}

func (NoStreamResponse) Error

func (e NoStreamResponse) Error() string

type NoUserCB

type NoUserCB struct {
	// contains filtered or unexported fields
}

func (NoUserCB) Error

func (e NoUserCB) Error() string

type NotJSMessage

type NotJSMessage struct {
	// contains filtered or unexported fields
}

func (NotJSMessage) Error

func (e NotJSMessage) Error() string

type PullModeNotAllowed

type PullModeNotAllowed struct {
	// contains filtered or unexported fields
}

func (PullModeNotAllowed) Error

func (e PullModeNotAllowed) Error() string

type PullSubscribeRequired

type PullSubscribeRequired struct {
	// contains filtered or unexported fields
}

func (PullSubscribeRequired) Error

func (e PullSubscribeRequired) Error() string

type PullSubscribeToPushConsumer

type PullSubscribeToPushConsumer struct {
	// contains filtered or unexported fields
}

func (PullSubscribeToPushConsumer) Error

func (e PullSubscribeToPushConsumer) Error() string

type ReconnectBufExceeded

type ReconnectBufExceeded struct {
	// contains filtered or unexported fields
}

func (ReconnectBufExceeded) Error

func (e ReconnectBufExceeded) Error() string

type SecureConnRequired

type SecureConnRequired struct {
	// contains filtered or unexported fields
}

func (SecureConnRequired) Error

func (e SecureConnRequired) Error() string

type SecureConnWanted

type SecureConnWanted struct {
	// contains filtered or unexported fields
}

func (SecureConnWanted) Error

func (e SecureConnWanted) Error() string

type SessionDTO

type SessionDTO struct {
	Session *string
	Service *string
	Method  *string
}

type SlowConsumer

type SlowConsumer struct {
	// contains filtered or unexported fields
}

func (SlowConsumer) Error

func (e SlowConsumer) Error() string

type StaleConnection

type StaleConnection struct {
	// contains filtered or unexported fields
}

func (StaleConnection) Error

func (e StaleConnection) Error() string

type StreamNameRequired

type StreamNameRequired struct {
	// contains filtered or unexported fields
}

func (StreamNameRequired) Error

func (e StreamNameRequired) Error() string

type StreamNotFound

type StreamNotFound struct {
	// contains filtered or unexported fields
}

func (StreamNotFound) Error

func (e StreamNotFound) Error() string

type StreamSnapshotConfigRequired

type StreamSnapshotConfigRequired struct {
	// contains filtered or unexported fields
}

func (StreamSnapshotConfigRequired) Error

func (e StreamSnapshotConfigRequired) Error() string

type SubjectMismatch

type SubjectMismatch struct {
	// contains filtered or unexported fields
}

func (SubjectMismatch) Error

func (e SubjectMismatch) Error() string

type Subscription

type Subscription interface {
	GetSubject() string
}

type SyncSubRequired

type SyncSubRequired struct {
	// contains filtered or unexported fields
}

func (SyncSubRequired) Error

func (e SyncSubRequired) Error() string

type Timeout

type Timeout struct {
	// contains filtered or unexported fields
}

func (Timeout) Error

func (e Timeout) Error() string

type TokenAlreadySet

type TokenAlreadySet struct {
	// contains filtered or unexported fields
}

func (TokenAlreadySet) Error

func (e TokenAlreadySet) Error() string

type TypeSubscription

type TypeSubscription struct {
	// contains filtered or unexported fields
}

func (TypeSubscription) Error

func (e TypeSubscription) Error() string

type UserButNoSigCB

type UserButNoSigCB struct {
	// contains filtered or unexported fields
}

func (UserButNoSigCB) Error

func (e UserButNoSigCB) Error() string

Jump to

Keyboard shortcuts

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