type serverConfig … type ServerOpt … // WithServerHandshaker can be passed to NewServer to ensure that the // handshaker is called before every connection attempt. // // Only one handshaker is allowed per server. func WithServerHandshaker(handshaker Handshaker) ServerOpt { … } // WithUnaryServerInterceptor sets the provided interceptor on the server func WithUnaryServerInterceptor(i UnaryServerInterceptor) ServerOpt { … } // WithChainUnaryServerInterceptor sets the provided chain of server interceptors func WithChainUnaryServerInterceptor(interceptors ...UnaryServerInterceptor) ServerOpt { … } func chainUnaryServerInterceptors(info *UnaryServerInfo, method Method, interceptors []UnaryServerInterceptor) Method { … }