network

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package network

@author: xwc1125

Package network

@author: xwc1125

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonRpc

type JsonRpc interface {
	Call(result interface{}, method string, args ...interface{}) error
	CallContext(ctx context.Context, result interface{}, method string, args1 ...interface{}) error
	Close()
}

type TlsConfig

type TlsConfig struct {
	Mod                TlsMod   `json:"mod" mapstructure:"mod"`                                   // 模式
	KeyFile            string   `json:"key_file" mapstructure:"key_file"`                         // 服务私钥
	CertFile           string   `json:"cert_file" mapstructure:"cert_file"`                       // 服务证书
	CaRoots            []string `json:"ca_roots" mapstructure:"ca_roots"`                         // ca根证书
	CaRootPaths        []string `json:"ca_root_paths" mapstructure:"ca_root_paths"`               // ca根证书路径
	ServerName         string   `json:"server_name" mapstructure:"server_name"`                   // 服务name
	InsecureSkipVerify bool     `json:"insecure_skip_verify" mapstructure:"insecure_skip_verify"` // 是否跳过非安全的校验
}

type TlsMod

type TlsMod string
var (
	Disable TlsMod = "disable" // 不启用TLS
	OneWay  TlsMod = "oneway"  // 单向认证
	TwoWay  TlsMod = "twoway"  // 双向认证
)

Directories

Path Synopsis
Package rpc @author: xwc1125 Package rpc provides access to the exported methods of an object across a network or other I/O connection.
Package rpc @author: xwc1125 Package rpc provides access to the exported methods of an object across a network or other I/O connection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL