Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TcpActionBuilder ¶
type TcpActionBuilder interface { WithName(name string) TcpActionBuilder With(function model.TcpActionFunction) TcpActionBuilder Build() model.TcpAction }
func NewTcpActionBuilder ¶
func NewTcpActionBuilder() TcpActionBuilder
type TcpCallHandlerBuilder ¶
type TcpCallHandlerBuilder interface { // Define mandatory handler functions group name WithName(name string) TcpCallHandlerBuilder //Ass a new Method Handler to the builder WithTcpHandling(action model.TcpAction) TcpCallHandlerBuilder // Associate an error channel, for creating a flow of errors from the request WithErrorChannel(ch chan error) TcpCallHandlerBuilder // Build the model.TcpCallHandler and report any error occurred during the build process Build() (model.TcpCallHandler, error) }
Helper for creating a new model.TcpCallHandler
func NewTcpCallHandlerBuilder ¶
func NewTcpCallHandlerBuilder() TcpCallHandlerBuilder
type TcpClientConfigBuilder ¶
type TcpClientConfigBuilder interface { // Use Tls encryption over standard plain communication protocol UseTlsEncryption(use bool) TcpClientConfigBuilder // Associate a custom network than the default 'tcp' one WithNetwork(network string) TcpClientConfigBuilder // Associate a custom encoding than the default jason format -> responding to 'application/json' Mime type WithEncoding(enc encoding.Encoding) TcpClientConfigBuilder // Associate an host and a port to the builder workflow WithHost(address string, port int) TcpClientConfigBuilder // Associate certificate and key files full path to the builder workflow WithTLSCerts(certificate string, key string) TcpClientConfigBuilder // Add some more certificate files to the certificate list to the builder workflow // If no certificate is settled up first call with associate the main TLS certificate files MoreTLSCerts(certificate string, key string) TcpClientConfigBuilder // Add one root CA certificate files to the certificate list to the builder workflow WithRootCaCert(certificate string) TcpClientConfigBuilder // Add one client CA certificate files to the certificate list to the builder workflow WithClientCaCert(certificate string) TcpClientConfigBuilder // Set up the certificate manager for the auto-scan of certificates for a folder WithCertificateManager(dir string) TcpClientConfigBuilder // Add more root CA certificate files to the certificate list to the builder workflow MoreClientCaCerts(certificate string) TcpClientConfigBuilder // Add more client CA certificate files to the certificate list to the builder workflow MoreRootCaCerts(certificate string) TcpClientConfigBuilder // Set min version different from tls.VersionTLS12 WithMinVersion(min uint16) TcpClientConfigBuilder // Set the insecure skip verify flag, by default it's false WithInsecureSkipVerify(insecure bool) TcpClientConfigBuilder // Set up renegotiation, by default it's sett up to: tls.RenegotiateNever WithRenegotiationSupport(renegotiation tls.RenegotiationSupport) TcpClientConfigBuilder // Set up the Client Session Cache manager (suggested: tls.NewLRUClientSessionCache(1024) or more ...) WithClientSessionCache(cache tls.ClientSessionCache) TcpClientConfigBuilder // Add more Cipher suites to the preset values : tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_RSA_WITH_AES_256_CBC_SHA MoreCipherSuites(cipherSuite uint16) TcpClientConfigBuilder // Add more Curve Ids to the current TLS Curve Preferences, adding to the preset values : tls.CurveP521, tls.CurveP384, // tls.CurveP256 MoreCurvePreferences(curve tls.CurveID) TcpClientConfigBuilder // Set preference for Server Size Cipher Suite WithPreferServerCipherSuites(preferServerCipherSuites bool) TcpClientConfigBuilder // Build the model.ClientConfig and report any error occurred during the build process Build() (model.TcpClientConfig, error) }
Helper for building a model.TcpClientConfig instance
func NewTcpClientConfigBuilder ¶
func NewTcpClientConfigBuilder() TcpClientConfigBuilder
type TcpServerConfigBuilder ¶
type TcpServerConfigBuilder interface { // Use Tls encryption over standard plain communication protocol UseTlsEncryption(use bool) TcpServerConfigBuilder // Associate a custom network than the default 'tcp' one WithNetwork(network string) TcpServerConfigBuilder // Associate a custom encoding than the default jason format -> responding to 'application/json' Mime type WithEncoding(enc encoding.Encoding) TcpServerConfigBuilder // Associate an host and a port to the builder workflow WithHost(address string, port int) TcpServerConfigBuilder // Add a certificate files to the certificate list to the builder workflow WithTLSCerts(certificate string, key string) TcpServerConfigBuilder // Add some more certificate files to the certificate list to the builder workflow MoreTLSCerts(certificate string, key string) TcpServerConfigBuilder // Add one root CA certificate files to the certificate list to the builder workflow WithRootCaCert(certificate string) TcpServerConfigBuilder // Add one client CA certificate files to the certificate list to the builder workflow WithClientCaCert(certificate string) TcpServerConfigBuilder // Set up the certificate manager for the auto-scan of certificates for a folder WithCertificateManager(dir string) TcpServerConfigBuilder // Add more root CA certificate files to the certificate list to the builder workflow MoreClientCaCerts(certificate string) TcpServerConfigBuilder // Add more client CA certificate files to the certificate list to the builder workflow MoreRootCaCerts(certificate string) TcpServerConfigBuilder // Set min version different from tls.VersionTLS12 WithMinVersion(min uint16) TcpServerConfigBuilder // Set the insecure skip verify flag, by default it's false WithInsecureSkipVerify(insecure bool) TcpServerConfigBuilder // Set up renegotiation, by default it's sett up to: tls.RenegotiateNever WithRenegotiationSupport(renegotiation tls.RenegotiationSupport) TcpServerConfigBuilder // Set up the Client Session Cache manager (suggested: tls.NewLRUClientSessionCache(1024) or more ...) WithClientSessionCache(cache tls.ClientSessionCache) TcpServerConfigBuilder // Add more Cipher suites to the preset values : tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_RSA_WITH_AES_256_GCM_SHA384, // tls.TLS_RSA_WITH_AES_256_CBC_SHA MoreCipherSuites(cipherSuite uint16) TcpServerConfigBuilder // Add more Curve Ids to the current TLS Curve Preferences, adding to the preset values : tls.CurveP521, tls.CurveP384, // tls.CurveP256 MoreCurvePreferences(curve tls.CurveID) TcpServerConfigBuilder // Set preference for Server Size Cipher Suite WithPreferServerCipherSuites(preferServerCipherSuites bool) TcpServerConfigBuilder // Build the model.ServerConfig and report any error occurred during the build process Build() (model.TcpServerConfig, error) }
Helper for building a model.TcpServerConfig instance
func NewTcpServerConfigBuilder ¶
func NewTcpServerConfigBuilder() TcpServerConfigBuilder
Click to show internal directories.
Click to hide internal directories.