Documentation ¶
Index ¶
- Variables
- type Server
- func (s *Server) Main()
- func (s *Server) Meta(ctx context.Context, in *jwtverifier_pb.MetaRequest) (*jwtverifier_pb.MetaResponse, error)
- func (s *Server) PerformanceOpts()
- func (s *Server) Run()
- func (s *Server) RunServer()
- func (s *Server) TLSOpts()
- func (s *Server) Verify(ctx context.Context, in *jwtverifier_pb.VerifyRequest) (*jwtverifier_pb.VerifyResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Node = Server{ App_Name: "jwthelper_verifierrpc", App_Version: "0.0.1", Address: "0.0.0.0:5000", Log_Level: "DEBUG", Default_ISS_Range: []string{}, }
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { App_Name string `json:"app_name,omitempty" jsonschema:"required,description=服务名"` App_Version string `json:"app_version,omitempty" jsonschema:"description=服务版本"` Address string `json:"address,omitempty" jsonschema:"required,description=服务的主机和端口"` Log_Level string `` /* 132-byte string literal not displayed */ // 性能设置 Max_Recv_Msg_Size int `json:"max_recv_msg_size,omitempty" jsonschema:"description=允许接收的最大消息长度"` Max_Send_Msg_Size int `json:"max_send_msg_size,omitempty" jsonschema:"description=允许发送的最大消息长度"` Initial_Window_Size int `json:"initial_window_size,omitempty" jsonschema:"description=基于Stream的滑动窗口大小"` Initial_Conn_Window_Size int `json:"initial_conn_window_size,omitempty" jsonschema:"description=基于Connection的滑动窗口大小"` Max_Concurrent_Streams int `json:"max_concurrent_streams,omitempty" jsonschema:"description=一个连接中最大并发Stream数"` Max_Connection_Idle int `json:"max_connection_idle,omitempty" jsonschema:"description=客户端连接的最大空闲时长"` Max_Connection_Age int `json:"max_connection_age,omitempty" jsonschema:"description=如果连接存活超过n则发送goaway"` Max_Connection_Age_Grace int `json:"max_connection_age_grace,omitempty" jsonschema:"description=强制关闭连接之前允许等待的rpc在n秒内完成"` Keepalive_Time int `json:"keepalive_time,omitempty" jsonschema:"description=空闲连接每隔n秒ping一次客户端已确保连接存活"` Keepalive_Timeout int `json:"keepalive_timeout,omitempty" jsonschema:"description=ping时长超过n则认为连接已死"` Keepalive_Enforcement_Min_Time int `json:"keepalive_enforement_min_time,omitempty" jsonschema:"description=如果客户端超过每n秒ping一次则终止连接"` Keepalive_Enforcement_Permit_Without_Stream bool `json:"keepalive_enforement_permit_without_stream,omitempty" jsonschema:"description=即使没有活动流也允许ping"` //TLS设置 Server_Cert_Path string `json:"server_cert_path,omitempty" jsonschema:"description=使用TLS时服务端的证书位置"` Server_Key_Path string `json:"server_key_path,omitempty" jsonschema:"description=使用TLS时服务端证书的私钥位置"` Ca_Cert_Path string `json:"ca_cert_path,omitempty" jsonschema:"description=使用TLS时根整数位置"` Client_Crl_Path string `json:"client_crl_path,omitempty" jsonschema:"description=客户端证书黑名单位置"` //使用XDS XDS bool `json:"xds,omitempty" jsonschema:"description=是否使用xDSAPIs"` XDS_CREDS bool `json:"xds_creds,omitempty" jsonschema:"description=是否使用xDSAPIs来接收TLS设置"` Algo_Name string `` /* 188-byte string literal not displayed */ Key_Path string `json:"key_path" jsonschema:"required,description=保存对称加密秘钥或者非对称加密公钥pem的文件位置"` Default_AUD string `json:"default_aud" jsonschema:"description=设置默认要匹配的aud值"` Default_ISS_Range []string `json:"default_iss_range" jsonschema:"description=设置默认要匹配的iss值范围"` jwtverifier_pb.UnimplementedJwtverifierServer `json:"-"` // contains filtered or unexported fields }
Server grpc的服务器结构体 服务集成了如下特性: 设置收发最大消息长度 健康检测 gzip做消息压缩 接口反射 TLS支持 keep alive 支持
func (*Server) Meta ¶
func (s *Server) Meta(ctx context.Context, in *jwtverifier_pb.MetaRequest) (*jwtverifier_pb.MetaResponse, error)
Meta 查看签名器的元信息
func (*Server) Verify ¶
func (s *Server) Verify(ctx context.Context, in *jwtverifier_pb.VerifyRequest) (*jwtverifier_pb.VerifyResponse, error)
Verify 校验签名
Click to show internal directories.
Click to hide internal directories.