package options
import "github.com/plgd-dev/go-coap/v3/options"
Index ¶
- type BlockwiseOpt
- func WithBlockwise(enable bool, szx blockwise.SZX, transferTimeout time.Duration) BlockwiseOpt
- func (o BlockwiseOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o BlockwiseOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o BlockwiseOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o BlockwiseOpt) UDPClientApply(cfg *udpClient.Config)
- func (o BlockwiseOpt) UDPServerApply(cfg *udpServer.Config)
- type CloseSocketOpt
- func WithCloseSocket() CloseSocketOpt
- func (o CloseSocketOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o CloseSocketOpt) UDPClientApply(cfg *udpClient.Config)
- type ConnectionCacheSizeOpt
- func WithConnectionCacheSize(connectionCacheSize uint16) ConnectionCacheSizeOpt
- func (o ConnectionCacheSizeOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o ConnectionCacheSizeOpt) TCPServerApply(cfg *tcpServer.Config)
- type ContextOpt
- func WithContext(ctx context.Context) ContextOpt
- func (o ContextOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o ContextOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o ContextOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o ContextOpt) UDPClientApply(cfg *udpClient.Config)
- func (o ContextOpt) UDPServerApply(cfg *udpServer.Config)
- type DialerOpt
- func WithDialer(dialer *net.Dialer) DialerOpt
- func (o DialerOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o DialerOpt) UDPClientApply(cfg *udpClient.Config)
- type DisablePeerTCPSignalMessageCSMsOpt
- func WithDisablePeerTCPSignalMessageCSMs() DisablePeerTCPSignalMessageCSMsOpt
- func (o DisablePeerTCPSignalMessageCSMsOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o DisablePeerTCPSignalMessageCSMsOpt) TCPServerApply(cfg *tcpServer.Config)
- type DisableTCPSignalMessageCSMOpt
- func WithDisableTCPSignalMessageCSM() DisableTCPSignalMessageCSMOpt
- func (o DisableTCPSignalMessageCSMOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o DisableTCPSignalMessageCSMOpt) TCPServerApply(cfg *tcpServer.Config)
- type ErrorFunc
- type ErrorsOpt
- func WithErrors(errors ErrorFunc) ErrorsOpt
- func (o ErrorsOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o ErrorsOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o ErrorsOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o ErrorsOpt) UDPClientApply(cfg *udpClient.Config)
- func (o ErrorsOpt) UDPServerApply(cfg *udpServer.Config)
- type GetTokenOpt
- func WithGetToken(getToken client.GetTokenFunc) GetTokenOpt
- func (o GetTokenOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o GetTokenOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o GetTokenOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o GetTokenOpt) UDPClientApply(cfg *udpClient.Config)
- func (o GetTokenOpt) UDPServerApply(cfg *udpServer.Config)
- type Handler
- type HandlerFuncOpt
- func WithHandlerFunc[H Handler](h H) HandlerFuncOpt[H]
- func (o HandlerFuncOpt[H]) DTLSServerApply(cfg *dtlsServer.Config)
- func (o HandlerFuncOpt[H]) TCPClientApply(cfg *tcpClient.Config)
- func (o HandlerFuncOpt[H]) TCPServerApply(cfg *tcpServer.Config)
- func (o HandlerFuncOpt[H]) UDPClientApply(cfg *udpClient.Config)
- func (o HandlerFuncOpt[H]) UDPServerApply(cfg *udpServer.Config)
- type InactivityMonitorOpt
- func WithInactivityMonitor[C OnInactiveFunc](duration time.Duration, onInactive C) InactivityMonitorOpt[C]
- func (o InactivityMonitorOpt[C]) DTLSServerApply(cfg *dtlsServer.Config)
- func (o InactivityMonitorOpt[C]) TCPClientApply(cfg *tcpClient.Config)
- func (o InactivityMonitorOpt[C]) TCPServerApply(cfg *tcpServer.Config)
- func (o InactivityMonitorOpt[C]) UDPClientApply(cfg *udpClient.Config)
- func (o InactivityMonitorOpt[C]) UDPServerApply(cfg *udpServer.Config)
- type KeepAliveOpt
- func WithKeepAlive[C OnInactiveFunc](maxRetries uint32, timeout time.Duration, onInactive C) KeepAliveOpt[C]
- func (o KeepAliveOpt[C]) DTLSServerApply(cfg *dtlsServer.Config)
- func (o KeepAliveOpt[C]) TCPClientApply(cfg *tcpClient.Config)
- func (o KeepAliveOpt[C]) TCPServerApply(cfg *tcpServer.Config)
- func (o KeepAliveOpt[C]) UDPClientApply(cfg *udpClient.Config)
- func (o KeepAliveOpt[C]) UDPServerApply(cfg *udpServer.Config)
- type LimitClientEndpointParallelRequestOpt
- func WithLimitClientEndpointParallelRequest(limitClientEndpointParallelRequests int64) LimitClientEndpointParallelRequestOpt
- func (o LimitClientEndpointParallelRequestOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o LimitClientEndpointParallelRequestOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o LimitClientEndpointParallelRequestOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o LimitClientEndpointParallelRequestOpt) UDPClientApply(cfg *udpClient.Config)
- func (o LimitClientEndpointParallelRequestOpt) UDPServerApply(cfg *udpServer.Config)
- type LimitClientParallelRequestOpt
- func WithLimitClientParallelRequest(limitClientParallelRequests int64) LimitClientParallelRequestOpt
- func (o LimitClientParallelRequestOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o LimitClientParallelRequestOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o LimitClientParallelRequestOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o LimitClientParallelRequestOpt) UDPClientApply(cfg *udpClient.Config)
- func (o LimitClientParallelRequestOpt) UDPServerApply(cfg *udpServer.Config)
- type MTUOpt
- func WithMTU(mtu uint16) MTUOpt
- func (o MTUOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o MTUOpt) UDPClientApply(cfg *udpClient.Config)
- func (o MTUOpt) UDPServerApply(cfg *udpServer.Config)
- type MaxMessageSizeOpt
- func WithMaxMessageSize(maxMessageSize uint32) MaxMessageSizeOpt
- func (o MaxMessageSizeOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o MaxMessageSizeOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o MaxMessageSizeOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o MaxMessageSizeOpt) UDPClientApply(cfg *udpClient.Config)
- func (o MaxMessageSizeOpt) UDPServerApply(cfg *udpServer.Config)
- type MessagePoolOpt
- func WithMessagePool(messagePool *pool.Pool) MessagePoolOpt
- func (o MessagePoolOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o MessagePoolOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o MessagePoolOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o MessagePoolOpt) UDPClientApply(cfg *udpClient.Config)
- func (o MessagePoolOpt) UDPServerApply(cfg *udpServer.Config)
- type MuxHandlerOpt
- func WithMux(m mux.Handler) MuxHandlerOpt
- func (o MuxHandlerOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o MuxHandlerOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o MuxHandlerOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o MuxHandlerOpt) UDPClientApply(cfg *udpClient.Config)
- func (o MuxHandlerOpt) UDPServerApply(cfg *udpServer.Config)
- type NetOpt
- func WithNetwork(net string) NetOpt
- func (o NetOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o NetOpt) UDPClientApply(cfg *udpClient.Config)
- type OnInactiveFunc
- type OnNewConnFunc
- type OnNewConnOpt
- func WithOnNewConn[F OnNewConnFunc](onNewConn F) OnNewConnOpt[F]
- func (o OnNewConnOpt[F]) DTLSServerApply(cfg *dtlsServer.Config)
- func (o OnNewConnOpt[F]) TCPServerApply(cfg *tcpServer.Config)
- func (o OnNewConnOpt[F]) UDPServerApply(cfg *udpServer.Config)
- type PeriodicRunnerOpt
- func WithPeriodicRunner(periodicRunner periodic.Func) PeriodicRunnerOpt
- func (o PeriodicRunnerOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o PeriodicRunnerOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o PeriodicRunnerOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o PeriodicRunnerOpt) UDPClientApply(cfg *udpClient.Config)
- func (o PeriodicRunnerOpt) UDPServerApply(cfg *udpServer.Config)
- type ProcessReceivedMessageOpt
- func WithProcessReceivedMessageFunc[C responsewriter.Client](processReceivedMessageFunc config.ProcessReceivedMessageFunc[C]) ProcessReceivedMessageOpt[C]
- func (o ProcessReceivedMessageOpt[C]) DTLSServerApply(cfg *dtlsServer.Config)
- func (o ProcessReceivedMessageOpt[C]) TCPClientApply(cfg *tcpClient.Config)
- func (o ProcessReceivedMessageOpt[C]) TCPServerApply(cfg *tcpServer.Config)
- func (o ProcessReceivedMessageOpt[C]) UDPClientApply(cfg *udpClient.Config)
- func (o ProcessReceivedMessageOpt[C]) UDPServerApply(cfg *udpServer.Config)
- type ReceivedMessageQueueSizeOpt
- func WithReceivedMessageQueueSize(receivedMessageQueueSize int) ReceivedMessageQueueSizeOpt
- func (o ReceivedMessageQueueSizeOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o ReceivedMessageQueueSizeOpt) TCPClientApply(cfg *tcpClient.Config)
- func (o ReceivedMessageQueueSizeOpt) TCPServerApply(cfg *tcpServer.Config)
- func (o ReceivedMessageQueueSizeOpt) UDPClientApply(cfg *udpClient.Config)
- func (o ReceivedMessageQueueSizeOpt) UDPServerApply(cfg *udpServer.Config)
- type TCPOnInactive
- type TLSOpt
- type TransmissionOpt
- func WithTransmission(transmissionNStart uint32, transmissionAcknowledgeTimeout time.Duration, transmissionMaxRetransmit uint32, ) TransmissionOpt
- func (o TransmissionOpt) DTLSServerApply(cfg *dtlsServer.Config)
- func (o TransmissionOpt) UDPClientApply(cfg *udpClient.Config)
- func (o TransmissionOpt) UDPServerApply(cfg *udpServer.Config)
- type UDPOnInactive
- type WithRequestMonitorFunc
- type WithRequestMonitorOpt
- func WithRequestMonitor[F WithRequestMonitorFunc](requestMonitor F) WithRequestMonitorOpt[F]
- func (o WithRequestMonitorOpt[F]) DTLSServerApply(cfg *dtlsServer.Config)
- func (o WithRequestMonitorOpt[F]) TCPServerApply(cfg *tcpServer.Config)
- func (o WithRequestMonitorOpt[F]) UDPServerApply(cfg *udpServer.Config)
Types ¶
type BlockwiseOpt ¶
type BlockwiseOpt struct {
// contains filtered or unexported fields
}
BlockwiseOpt network option.
func WithBlockwise ¶
WithBlockwise configure's blockwise transfer.
func (BlockwiseOpt) DTLSServerApply ¶
func (o BlockwiseOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (BlockwiseOpt) TCPClientApply ¶
func (o BlockwiseOpt) TCPClientApply(cfg *tcpClient.Config)
func (BlockwiseOpt) TCPServerApply ¶
func (o BlockwiseOpt) TCPServerApply(cfg *tcpServer.Config)
func (BlockwiseOpt) UDPClientApply ¶
func (o BlockwiseOpt) UDPClientApply(cfg *udpClient.Config)
func (BlockwiseOpt) UDPServerApply ¶
func (o BlockwiseOpt) UDPServerApply(cfg *udpServer.Config)
type CloseSocketOpt ¶
type CloseSocketOpt struct{}
CloseSocketOpt close socket option.
func WithCloseSocket ¶
func WithCloseSocket() CloseSocketOpt
WithCloseSocket closes socket at the close connection.
func (CloseSocketOpt) TCPClientApply ¶
func (o CloseSocketOpt) TCPClientApply(cfg *tcpClient.Config)
func (CloseSocketOpt) UDPClientApply ¶
func (o CloseSocketOpt) UDPClientApply(cfg *udpClient.Config)
type ConnectionCacheSizeOpt ¶
type ConnectionCacheSizeOpt struct {
// contains filtered or unexported fields
}
ConnectionCacheOpt network option.
func WithConnectionCacheSize ¶
func WithConnectionCacheSize(connectionCacheSize uint16) ConnectionCacheSizeOpt
WithConnectionCacheSize configure's maximum size of cache of read buffer.
func (ConnectionCacheSizeOpt) TCPClientApply ¶
func (o ConnectionCacheSizeOpt) TCPClientApply(cfg *tcpClient.Config)
func (ConnectionCacheSizeOpt) TCPServerApply ¶
func (o ConnectionCacheSizeOpt) TCPServerApply(cfg *tcpServer.Config)
type ContextOpt ¶
type ContextOpt struct {
// contains filtered or unexported fields
}
ContextOpt handler function option.
func WithContext ¶
func WithContext(ctx context.Context) ContextOpt
WithContext sets parent context of server.
func (ContextOpt) DTLSServerApply ¶
func (o ContextOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (ContextOpt) TCPClientApply ¶
func (o ContextOpt) TCPClientApply(cfg *tcpClient.Config)
func (ContextOpt) TCPServerApply ¶
func (o ContextOpt) TCPServerApply(cfg *tcpServer.Config)
func (ContextOpt) UDPClientApply ¶
func (o ContextOpt) UDPClientApply(cfg *udpClient.Config)
func (ContextOpt) UDPServerApply ¶
func (o ContextOpt) UDPServerApply(cfg *udpServer.Config)
type DialerOpt ¶
type DialerOpt struct {
// contains filtered or unexported fields
}
DialerOpt dialer option.
func WithDialer ¶
WithDialer set dialer for dial.
func (DialerOpt) TCPClientApply ¶
func (DialerOpt) UDPClientApply ¶
type DisablePeerTCPSignalMessageCSMsOpt ¶
type DisablePeerTCPSignalMessageCSMsOpt struct{}
DisablePeerTCPSignalMessageCSMsOpt coap-tcp csm option.
func WithDisablePeerTCPSignalMessageCSMs ¶
func WithDisablePeerTCPSignalMessageCSMs() DisablePeerTCPSignalMessageCSMsOpt
WithDisablePeerTCPSignalMessageCSMs ignor peer's CSM message.
func (DisablePeerTCPSignalMessageCSMsOpt) TCPClientApply ¶
func (o DisablePeerTCPSignalMessageCSMsOpt) TCPClientApply(cfg *tcpClient.Config)
func (DisablePeerTCPSignalMessageCSMsOpt) TCPServerApply ¶
func (o DisablePeerTCPSignalMessageCSMsOpt) TCPServerApply(cfg *tcpServer.Config)
type DisableTCPSignalMessageCSMOpt ¶
type DisableTCPSignalMessageCSMOpt struct{}
DisableTCPSignalMessageCSMOpt coap-tcp csm option.
func WithDisableTCPSignalMessageCSM ¶
func WithDisableTCPSignalMessageCSM() DisableTCPSignalMessageCSMOpt
WithDisableTCPSignalMessageCSM don't send CSM when client conn is created.
func (DisableTCPSignalMessageCSMOpt) TCPClientApply ¶
func (o DisableTCPSignalMessageCSMOpt) TCPClientApply(cfg *tcpClient.Config)
func (DisableTCPSignalMessageCSMOpt) TCPServerApply ¶
func (o DisableTCPSignalMessageCSMOpt) TCPServerApply(cfg *tcpServer.Config)
type ErrorFunc ¶
type ErrorsOpt ¶
type ErrorsOpt struct {
// contains filtered or unexported fields
}
ErrorsOpt errors option.
func WithErrors ¶
WithErrors set function for logging error.
func (ErrorsOpt) DTLSServerApply ¶
func (o ErrorsOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (ErrorsOpt) TCPClientApply ¶
func (ErrorsOpt) TCPServerApply ¶
func (ErrorsOpt) UDPClientApply ¶
func (ErrorsOpt) UDPServerApply ¶
type GetTokenOpt ¶
type GetTokenOpt struct {
// contains filtered or unexported fields
}
GetTokenOpt token option.
func WithGetToken ¶
func WithGetToken(getToken client.GetTokenFunc) GetTokenOpt
WithGetToken set function for generating tokens.
func (GetTokenOpt) DTLSServerApply ¶
func (o GetTokenOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (GetTokenOpt) TCPClientApply ¶
func (o GetTokenOpt) TCPClientApply(cfg *tcpClient.Config)
func (GetTokenOpt) TCPServerApply ¶
func (o GetTokenOpt) TCPServerApply(cfg *tcpServer.Config)
func (GetTokenOpt) UDPClientApply ¶
func (o GetTokenOpt) UDPClientApply(cfg *udpClient.Config)
func (GetTokenOpt) UDPServerApply ¶
func (o GetTokenOpt) UDPServerApply(cfg *udpServer.Config)
type Handler ¶
type Handler interface { tcpClient.HandlerFunc | udpClient.HandlerFunc }
type HandlerFuncOpt ¶
type HandlerFuncOpt[H Handler] struct { // contains filtered or unexported fields }
HandlerFuncOpt handler function option.
func WithHandlerFunc ¶
func WithHandlerFunc[H Handler](h H) HandlerFuncOpt[H]
WithHandlerFunc set handle for handling request's.
func (HandlerFuncOpt[H]) DTLSServerApply ¶
func (o HandlerFuncOpt[H]) DTLSServerApply(cfg *dtlsServer.Config)
func (HandlerFuncOpt[H]) TCPClientApply ¶
func (o HandlerFuncOpt[H]) TCPClientApply(cfg *tcpClient.Config)
func (HandlerFuncOpt[H]) TCPServerApply ¶
func (o HandlerFuncOpt[H]) TCPServerApply(cfg *tcpServer.Config)
func (HandlerFuncOpt[H]) UDPClientApply ¶
func (o HandlerFuncOpt[H]) UDPClientApply(cfg *udpClient.Config)
func (HandlerFuncOpt[H]) UDPServerApply ¶
func (o HandlerFuncOpt[H]) UDPServerApply(cfg *udpServer.Config)
type InactivityMonitorOpt ¶
type InactivityMonitorOpt[C OnInactiveFunc] struct { // contains filtered or unexported fields }
InactivityMonitorOpt notifies when a connection was inactive for a given duration.
func WithInactivityMonitor ¶
func WithInactivityMonitor[C OnInactiveFunc](duration time.Duration, onInactive C) InactivityMonitorOpt[C]
WithInactivityMonitor set deadline's for read operations over client connection.
func (InactivityMonitorOpt[C]) DTLSServerApply ¶
func (o InactivityMonitorOpt[C]) DTLSServerApply(cfg *dtlsServer.Config)
func (InactivityMonitorOpt[C]) TCPClientApply ¶
func (o InactivityMonitorOpt[C]) TCPClientApply(cfg *tcpClient.Config)
func (InactivityMonitorOpt[C]) TCPServerApply ¶
func (o InactivityMonitorOpt[C]) TCPServerApply(cfg *tcpServer.Config)
func (InactivityMonitorOpt[C]) UDPClientApply ¶
func (o InactivityMonitorOpt[C]) UDPClientApply(cfg *udpClient.Config)
func (InactivityMonitorOpt[C]) UDPServerApply ¶
func (o InactivityMonitorOpt[C]) UDPServerApply(cfg *udpServer.Config)
type KeepAliveOpt ¶
type KeepAliveOpt[C OnInactiveFunc] struct { // contains filtered or unexported fields }
KeepAliveOpt keepalive option.
func WithKeepAlive ¶
func WithKeepAlive[C OnInactiveFunc](maxRetries uint32, timeout time.Duration, onInactive C) KeepAliveOpt[C]
WithKeepAlive monitoring's client connection's.
func (KeepAliveOpt[C]) DTLSServerApply ¶
func (o KeepAliveOpt[C]) DTLSServerApply(cfg *dtlsServer.Config)
func (KeepAliveOpt[C]) TCPClientApply ¶
func (o KeepAliveOpt[C]) TCPClientApply(cfg *tcpClient.Config)
func (KeepAliveOpt[C]) TCPServerApply ¶
func (o KeepAliveOpt[C]) TCPServerApply(cfg *tcpServer.Config)
func (KeepAliveOpt[C]) UDPClientApply ¶
func (o KeepAliveOpt[C]) UDPClientApply(cfg *udpClient.Config)
func (KeepAliveOpt[C]) UDPServerApply ¶
func (o KeepAliveOpt[C]) UDPServerApply(cfg *udpServer.Config)
type LimitClientEndpointParallelRequestOpt ¶
type LimitClientEndpointParallelRequestOpt struct {
// contains filtered or unexported fields
}
LimitClientEndpointParallelRequestOpt limit's number of parallel requests to endpoint by client.
func WithLimitClientEndpointParallelRequest ¶
func WithLimitClientEndpointParallelRequest(limitClientEndpointParallelRequests int64) LimitClientEndpointParallelRequestOpt
WithLimitClientEndpointParallelRequest limits number of parallel requests to endpoint from client. (default: 1)
func (LimitClientEndpointParallelRequestOpt) DTLSServerApply ¶
func (o LimitClientEndpointParallelRequestOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (LimitClientEndpointParallelRequestOpt) TCPClientApply ¶
func (o LimitClientEndpointParallelRequestOpt) TCPClientApply(cfg *tcpClient.Config)
func (LimitClientEndpointParallelRequestOpt) TCPServerApply ¶
func (o LimitClientEndpointParallelRequestOpt) TCPServerApply(cfg *tcpServer.Config)
func (LimitClientEndpointParallelRequestOpt) UDPClientApply ¶
func (o LimitClientEndpointParallelRequestOpt) UDPClientApply(cfg *udpClient.Config)
func (LimitClientEndpointParallelRequestOpt) UDPServerApply ¶
func (o LimitClientEndpointParallelRequestOpt) UDPServerApply(cfg *udpServer.Config)
type LimitClientParallelRequestOpt ¶
type LimitClientParallelRequestOpt struct {
// contains filtered or unexported fields
}
LimitClientParallelRequestOpt limit's number of parallel requests from client.
func WithLimitClientParallelRequest ¶
func WithLimitClientParallelRequest(limitClientParallelRequests int64) LimitClientParallelRequestOpt
WithLimitClientParallelRequestOpt limits number of parallel requests from client. (default: 1)
func (LimitClientParallelRequestOpt) DTLSServerApply ¶
func (o LimitClientParallelRequestOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (LimitClientParallelRequestOpt) TCPClientApply ¶
func (o LimitClientParallelRequestOpt) TCPClientApply(cfg *tcpClient.Config)
func (LimitClientParallelRequestOpt) TCPServerApply ¶
func (o LimitClientParallelRequestOpt) TCPServerApply(cfg *tcpServer.Config)
func (LimitClientParallelRequestOpt) UDPClientApply ¶
func (o LimitClientParallelRequestOpt) UDPClientApply(cfg *udpClient.Config)
func (LimitClientParallelRequestOpt) UDPServerApply ¶
func (o LimitClientParallelRequestOpt) UDPServerApply(cfg *udpServer.Config)
type MTUOpt ¶
type MTUOpt struct {
// contains filtered or unexported fields
}
MTUOpt transmission options.
func WithMTU ¶
Setup MTU unit
func (MTUOpt) DTLSServerApply ¶
func (o MTUOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (MTUOpt) UDPClientApply ¶
func (MTUOpt) UDPServerApply ¶
type MaxMessageSizeOpt ¶
type MaxMessageSizeOpt struct {
// contains filtered or unexported fields
}
MaxMessageSizeOpt handler function option.
func WithMaxMessageSize ¶
func WithMaxMessageSize(maxMessageSize uint32) MaxMessageSizeOpt
WithMaxMessageSize limit size of processed message.
func (MaxMessageSizeOpt) DTLSServerApply ¶
func (o MaxMessageSizeOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (MaxMessageSizeOpt) TCPClientApply ¶
func (o MaxMessageSizeOpt) TCPClientApply(cfg *tcpClient.Config)
func (MaxMessageSizeOpt) TCPServerApply ¶
func (o MaxMessageSizeOpt) TCPServerApply(cfg *tcpServer.Config)
func (MaxMessageSizeOpt) UDPClientApply ¶
func (o MaxMessageSizeOpt) UDPClientApply(cfg *udpClient.Config)
func (MaxMessageSizeOpt) UDPServerApply ¶
func (o MaxMessageSizeOpt) UDPServerApply(cfg *udpServer.Config)
type MessagePoolOpt ¶
type MessagePoolOpt struct {
// contains filtered or unexported fields
}
ConnectionCacheOpt network option.
func WithMessagePool ¶
func WithMessagePool(messagePool *pool.Pool) MessagePoolOpt
WithMessagePool configure's message pool for acquire/releasing coap messages
func (MessagePoolOpt) DTLSServerApply ¶
func (o MessagePoolOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (MessagePoolOpt) TCPClientApply ¶
func (o MessagePoolOpt) TCPClientApply(cfg *tcpClient.Config)
func (MessagePoolOpt) TCPServerApply ¶
func (o MessagePoolOpt) TCPServerApply(cfg *tcpServer.Config)
func (MessagePoolOpt) UDPClientApply ¶
func (o MessagePoolOpt) UDPClientApply(cfg *udpClient.Config)
func (MessagePoolOpt) UDPServerApply ¶
func (o MessagePoolOpt) UDPServerApply(cfg *udpServer.Config)
type MuxHandlerOpt ¶
type MuxHandlerOpt struct {
// contains filtered or unexported fields
}
HandlerFuncOpt handler function option.
func WithMux ¶
func WithMux(m mux.Handler) MuxHandlerOpt
WithMux sets multiplexer for handle requests.
func (MuxHandlerOpt) DTLSServerApply ¶
func (o MuxHandlerOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (MuxHandlerOpt) TCPClientApply ¶
func (o MuxHandlerOpt) TCPClientApply(cfg *tcpClient.Config)
func (MuxHandlerOpt) TCPServerApply ¶
func (o MuxHandlerOpt) TCPServerApply(cfg *tcpServer.Config)
func (MuxHandlerOpt) UDPClientApply ¶
func (o MuxHandlerOpt) UDPClientApply(cfg *udpClient.Config)
func (MuxHandlerOpt) UDPServerApply ¶
func (o MuxHandlerOpt) UDPServerApply(cfg *udpServer.Config)
type NetOpt ¶
type NetOpt struct {
// contains filtered or unexported fields
}
NetOpt network option.
func WithNetwork ¶
WithNetwork define's tcp version (udp4, udp6, tcp) for client.
func (NetOpt) TCPClientApply ¶
func (NetOpt) UDPClientApply ¶
type OnInactiveFunc ¶
type OnInactiveFunc interface { UDPOnInactive | TCPOnInactive }
type OnNewConnFunc ¶
type OnNewConnFunc interface { tcpServer.OnNewConnFunc | udpServer.OnNewConnFunc }
type OnNewConnOpt ¶
type OnNewConnOpt[F OnNewConnFunc] struct { // contains filtered or unexported fields }
OnNewConnOpt network option.
func WithOnNewConn ¶
func WithOnNewConn[F OnNewConnFunc](onNewConn F) OnNewConnOpt[F]
WithOnNewConn server's notify about new client connection.
func (OnNewConnOpt[F]) DTLSServerApply ¶
func (o OnNewConnOpt[F]) DTLSServerApply(cfg *dtlsServer.Config)
func (OnNewConnOpt[F]) TCPServerApply ¶
func (o OnNewConnOpt[F]) TCPServerApply(cfg *tcpServer.Config)
func (OnNewConnOpt[F]) UDPServerApply ¶
func (o OnNewConnOpt[F]) UDPServerApply(cfg *udpServer.Config)
type PeriodicRunnerOpt ¶
type PeriodicRunnerOpt struct {
// contains filtered or unexported fields
}
PeriodicRunnerOpt function which is executed in every ticks
func WithPeriodicRunner ¶
func WithPeriodicRunner(periodicRunner periodic.Func) PeriodicRunnerOpt
WithPeriodicRunner set function which is executed in every ticks.
func (PeriodicRunnerOpt) DTLSServerApply ¶
func (o PeriodicRunnerOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (PeriodicRunnerOpt) TCPClientApply ¶
func (o PeriodicRunnerOpt) TCPClientApply(cfg *tcpClient.Config)
func (PeriodicRunnerOpt) TCPServerApply ¶
func (o PeriodicRunnerOpt) TCPServerApply(cfg *tcpServer.Config)
func (PeriodicRunnerOpt) UDPClientApply ¶
func (o PeriodicRunnerOpt) UDPClientApply(cfg *udpClient.Config)
func (PeriodicRunnerOpt) UDPServerApply ¶
func (o PeriodicRunnerOpt) UDPServerApply(cfg *udpServer.Config)
type ProcessReceivedMessageOpt ¶
type ProcessReceivedMessageOpt[C responsewriter.Client] struct { ProcessReceivedMessageFunc config.ProcessReceivedMessageFunc[C] }
ProcessReceivedMessageOpt gopool option.
func WithProcessReceivedMessageFunc ¶
func WithProcessReceivedMessageFunc[C responsewriter.Client](processReceivedMessageFunc config.ProcessReceivedMessageFunc[C]) ProcessReceivedMessageOpt[C]
func (ProcessReceivedMessageOpt[C]) DTLSServerApply ¶
func (o ProcessReceivedMessageOpt[C]) DTLSServerApply(cfg *dtlsServer.Config)
func (ProcessReceivedMessageOpt[C]) TCPClientApply ¶
func (o ProcessReceivedMessageOpt[C]) TCPClientApply(cfg *tcpClient.Config)
func (ProcessReceivedMessageOpt[C]) TCPServerApply ¶
func (o ProcessReceivedMessageOpt[C]) TCPServerApply(cfg *tcpServer.Config)
func (ProcessReceivedMessageOpt[C]) UDPClientApply ¶
func (o ProcessReceivedMessageOpt[C]) UDPClientApply(cfg *udpClient.Config)
func (ProcessReceivedMessageOpt[C]) UDPServerApply ¶
func (o ProcessReceivedMessageOpt[C]) UDPServerApply(cfg *udpServer.Config)
type ReceivedMessageQueueSizeOpt ¶
type ReceivedMessageQueueSizeOpt struct {
// contains filtered or unexported fields
}
ReceivedMessageQueueSizeOpt limit's message queue size for received messages.
func WithReceivedMessageQueueSize ¶
func WithReceivedMessageQueueSize(receivedMessageQueueSize int) ReceivedMessageQueueSizeOpt
WithReceivedMessageQueueSize limit's message queue size for received messages. (default: 16)
func (ReceivedMessageQueueSizeOpt) DTLSServerApply ¶
func (o ReceivedMessageQueueSizeOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (ReceivedMessageQueueSizeOpt) TCPClientApply ¶
func (o ReceivedMessageQueueSizeOpt) TCPClientApply(cfg *tcpClient.Config)
func (ReceivedMessageQueueSizeOpt) TCPServerApply ¶
func (o ReceivedMessageQueueSizeOpt) TCPServerApply(cfg *tcpServer.Config)
func (ReceivedMessageQueueSizeOpt) UDPClientApply ¶
func (o ReceivedMessageQueueSizeOpt) UDPClientApply(cfg *udpClient.Config)
func (ReceivedMessageQueueSizeOpt) UDPServerApply ¶
func (o ReceivedMessageQueueSizeOpt) UDPServerApply(cfg *udpServer.Config)
type TCPOnInactive ¶
type TLSOpt ¶
type TLSOpt struct {
// contains filtered or unexported fields
}
TLSOpt tls configuration option.
func WithTLS ¶
WithTLS creates tls connection.
func (TLSOpt) TCPClientApply ¶
type TransmissionOpt ¶
type TransmissionOpt struct {
// contains filtered or unexported fields
}
TransmissionOpt transmission options.
func WithTransmission ¶
func WithTransmission(transmissionNStart uint32, transmissionAcknowledgeTimeout time.Duration, transmissionMaxRetransmit uint32, ) TransmissionOpt
WithTransmission set options for (re)transmission for Confirmable message-s.
func (TransmissionOpt) DTLSServerApply ¶
func (o TransmissionOpt) DTLSServerApply(cfg *dtlsServer.Config)
func (TransmissionOpt) UDPClientApply ¶
func (o TransmissionOpt) UDPClientApply(cfg *udpClient.Config)
func (TransmissionOpt) UDPServerApply ¶
func (o TransmissionOpt) UDPServerApply(cfg *udpServer.Config)
type UDPOnInactive ¶
type WithRequestMonitorFunc ¶
type WithRequestMonitorFunc interface { tcpClient.RequestMonitorFunc | udpClient.RequestMonitorFunc }
WithRequestMonitor
type WithRequestMonitorOpt ¶
type WithRequestMonitorOpt[F WithRequestMonitorFunc] struct { // contains filtered or unexported fields }
WithRequestMonitorOpt network option.
func WithRequestMonitor ¶
func WithRequestMonitor[F WithRequestMonitorFunc](requestMonitor F) WithRequestMonitorOpt[F]
WithRequestMonitor enables request monitoring for the connection. It is called for each CoAP message received from the peer before it is processed. If it returns an error, the connection is closed. If it returns true, the message is dropped.
func (WithRequestMonitorOpt[F]) DTLSServerApply ¶
func (o WithRequestMonitorOpt[F]) DTLSServerApply(cfg *dtlsServer.Config)
func (WithRequestMonitorOpt[F]) TCPServerApply ¶
func (o WithRequestMonitorOpt[F]) TCPServerApply(cfg *tcpServer.Config)
func (WithRequestMonitorOpt[F]) UDPServerApply ¶
func (o WithRequestMonitorOpt[F]) UDPServerApply(cfg *udpServer.Config)
Source Files ¶
commonOptions.go tcpOptions.go udpOptions.go
Directories ¶
Path | Synopsis |
---|---|
options/config |
- Version
- v3.3.6 (latest)
- Published
- Sep 18, 2024
- Platform
- linux/amd64
- Imports
- 18 packages
- Last checked
- 1 week ago –
Tools for package owners.