Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultPeerCacheExpiration is default expiration of peer cache. DefaultPeerCacheExpiration = 10 * time.Minute // DefaultPeerCacheCleanupInterval is default cleanup interval of peer cache. DefaultPeerCacheCleanupInterval = 1 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option is a functional option for rpc server.
func WithGRPCServerOptions ¶
func WithGRPCServerOptions(opts []grpc.ServerOption) Option
WithGRPCServerOptions set the server options of grpc.
func WithSelfSignedCert ¶
func WithSelfSignedCert(tlsCert *tls.Certificate) Option
WithCertificate set the self signed certificate for server.
type SelfSignedCert ¶
type SelfSignedCert struct { // TLSCert is certificate of tls. TLSCert *tls.Certificate // X509Cert is certificate of x509. X509Cert *x509.Certificate // CertChain is certificate chain of ASN.1 DER form. CertChain [][]byte }
SelfSignedCert is self signed certificate.
Click to show internal directories.
Click to hide internal directories.