const ChaosDaemonServerName = "chaos-daemon.chaos-mesh.org"
DefaultRPCTimeout specifies default timeout of RPC between controller and chaos-operator
const DefaultRPCTimeout = 60 * time.Second
RPCTimeout specifies timeout of RPC between controller and chaos-operator
var RPCTimeout = DefaultRPCTimeout
func TimeoutClientInterceptor(timeout time.Duration) func(context.Context, string, interface{}, interface{}, *grpc.ClientConn, grpc.UnaryInvoker, ...grpc.CallOption) error
TimeoutClientInterceptor wraps the RPC with a timeout.
func TimeoutServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
TimeoutServerInterceptor ensures the context is intact before handling over the request to application.
type CredentialProvider interface {
// contains filtered or unexported methods
}
type FileProvider struct {
// contains filtered or unexported fields
}
type GrpcBuilder struct {
// contains filtered or unexported fields
}
func Builder(address string, port int) *GrpcBuilder
func (it *GrpcBuilder) Build() (*grpc.ClientConn, error)
func (it *GrpcBuilder) Insecure() *GrpcBuilder
func (it *GrpcBuilder) TLSFromFile(caCertPath string, certPath string, keyPath string) *GrpcBuilder
func (it *GrpcBuilder) TLSFromRaw(caCert []byte, cert []byte, key []byte) *GrpcBuilder
func (it *GrpcBuilder) WithDefaultTimeout() *GrpcBuilder
func (it *GrpcBuilder) WithNamespacedName(id types.NamespacedName) *GrpcBuilder
func (it *GrpcBuilder) WithTimeout(timeout time.Duration) *GrpcBuilder
type InsecureProvider struct { }
type RawProvider struct {
// contains filtered or unexported fields
}
type TLSFile struct { CaCert string Cert string Key string }
type TLSRaw struct { CaCert []byte Cert []byte Key []byte }