Documentation ¶
Index ¶
- Variables
- func CreateOrUpdate(ctx context.Context, c client.Client, obj client.Object) error
- func DecodeStruct[T any](input interface{}) (*T, error)
- func DeepCopy[T any](in *T) *T
- func DeepCopyInto[T any](out, in *T)
- func GenerateRandomString(length int) []byte
- func LoadClientMTLSConfig(certs *v1beta1.MTLSSpec) (*tls.Config, error)
- func LoadServingCertBundle(certsSpec v1beta1.CertsSpec) (*tls.Certificate, *x509.CertPool, error)
- func Must[T any](t T, err ...error) T
- func NewK8sClient(options ClientOptions) (client.Client, error)
- func NewProtocolListener(addr string) (net.Listener, error)
- func NewTestLogger() logr.Logger
- func ParsePEMEncodedCert(data []byte) (*x509.Certificate, error)
- func ParsePEMEncodedCertChain(chain []byte) ([]*x509.Certificate, error)
- func Pointer[T any](t T) *T
- func ProtoClone[T proto.Message](msg T) T
- func StatusCode(err error) codes.Code
- func StatusError(code codes.Code) error
- type ClientOptions
- type ClientStreamWithContext
- func (s *ClientStreamWithContext) CloseSend() error
- func (s *ClientStreamWithContext) Context() context.Context
- func (s *ClientStreamWithContext) Header() (metadata.MD, error)
- func (s *ClientStreamWithContext) RecvMsg(m interface{}) error
- func (s *ClientStreamWithContext) SendMsg(m interface{}) error
- func (s *ClientStreamWithContext) Trailer() metadata.MD
- type DelimiterCodec
- type RequeueOp
- type ServerStreamWithContext
- func (s *ServerStreamWithContext) Context() context.Context
- func (s *ServerStreamWithContext) RecvMsg(m interface{}) error
- func (s *ServerStreamWithContext) SendHeader(md metadata.MD) error
- func (s *ServerStreamWithContext) SendMsg(m interface{}) error
- func (s *ServerStreamWithContext) SetHeader(md metadata.MD) error
- func (s *ServerStreamWithContext) SetTrailer(md metadata.MD)
- type ServicePack
Constants ¶
This section is empty.
Variables ¶
View Source
var EncoderConfig = zapcore.EncoderConfig{ MessageKey: "M", LevelKey: "L", TimeKey: "T", NameKey: "N", CallerKey: "C", FunctionKey: "", StacktraceKey: "S", ConsoleSeparator: " ", EncodeLevel: zapcore.CapitalColorLevelEncoder, EncodeCaller: func(ec zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(chalk.Dim.TextStyle(ec.TrimmedPath())) }, EncodeName: func(name string, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(chalk.Dim.TextStyle( strings.Replace(name, "controller-runtime.manager.", "", 1))) }, EncodeTime: func(t time.Time, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(t.Format("[15:04:05]")) }, EncodeDuration: zapcore.SecondsDurationEncoder, }
View Source
var ErrUnsupportedProtocolScheme = errors.New("unsupported protocol scheme")
View Source
var Version string
Functions ¶
func CreateOrUpdate ¶
func DecodeStruct ¶ added in v0.4.1
func DeepCopyInto ¶ added in v0.4.1
func DeepCopyInto[T any](out, in *T)
func GenerateRandomString ¶ added in v0.3.1
func LoadClientMTLSConfig ¶ added in v0.4.1
func LoadServingCertBundle ¶ added in v0.4.1
func NewK8sClient ¶ added in v0.4.1
func NewK8sClient(options ClientOptions) (client.Client, error)
func NewProtocolListener ¶ added in v0.4.1
func NewTestLogger ¶
func ParsePEMEncodedCert ¶ added in v0.4.1
func ParsePEMEncodedCert(data []byte) (*x509.Certificate, error)
func ParsePEMEncodedCertChain ¶ added in v0.4.1
func ParsePEMEncodedCertChain(chain []byte) ([]*x509.Certificate, error)
func ProtoClone ¶ added in v0.5.4
func StatusCode ¶ added in v0.5.4
Like status.Code(), but supports wrapped errors.
func StatusError ¶ added in v0.5.4
Types ¶
type ClientOptions ¶ added in v0.4.1
type ClientStreamWithContext ¶ added in v0.5.4
type ClientStreamWithContext struct { Stream grpc.ClientStream Ctx context.Context }
func (*ClientStreamWithContext) CloseSend ¶ added in v0.5.4
func (s *ClientStreamWithContext) CloseSend() error
func (*ClientStreamWithContext) Context ¶ added in v0.5.4
func (s *ClientStreamWithContext) Context() context.Context
func (*ClientStreamWithContext) Header ¶ added in v0.5.4
func (s *ClientStreamWithContext) Header() (metadata.MD, error)
func (*ClientStreamWithContext) RecvMsg ¶ added in v0.5.4
func (s *ClientStreamWithContext) RecvMsg(m interface{}) error
func (*ClientStreamWithContext) SendMsg ¶ added in v0.5.4
func (s *ClientStreamWithContext) SendMsg(m interface{}) error
func (*ClientStreamWithContext) Trailer ¶ added in v0.5.4
func (s *ClientStreamWithContext) Trailer() metadata.MD
type DelimiterCodec ¶ added in v0.4.1
type DelimiterCodec struct {
// contains filtered or unexported fields
}
Implements rbac.Codec
func NewDelimiterCodec ¶ added in v0.4.1
func NewDelimiterCodec(key string, delimiter string) DelimiterCodec
func (DelimiterCodec) Decode ¶ added in v0.4.1
func (d DelimiterCodec) Decode(s string) []string
func (DelimiterCodec) Encode ¶ added in v0.4.1
func (d DelimiterCodec) Encode(ids []string) string
func (DelimiterCodec) Key ¶ added in v0.4.1
func (d DelimiterCodec) Key() string
type RequeueOp ¶
type RequeueOp struct {
// contains filtered or unexported fields
}
func DoNotRequeue ¶
func DoNotRequeue() RequeueOp
func RequeueAfter ¶
func RequeueErr ¶
func (RequeueOp) ShouldRequeue ¶
type ServerStreamWithContext ¶ added in v0.5.4
type ServerStreamWithContext struct { Stream grpc.ServerStream Ctx context.Context }
func (*ServerStreamWithContext) Context ¶ added in v0.5.4
func (s *ServerStreamWithContext) Context() context.Context
func (*ServerStreamWithContext) RecvMsg ¶ added in v0.5.4
func (s *ServerStreamWithContext) RecvMsg(m interface{}) error
func (*ServerStreamWithContext) SendHeader ¶ added in v0.5.4
func (s *ServerStreamWithContext) SendHeader(md metadata.MD) error
func (*ServerStreamWithContext) SendMsg ¶ added in v0.5.4
func (s *ServerStreamWithContext) SendMsg(m interface{}) error
func (*ServerStreamWithContext) SetHeader ¶ added in v0.5.4
func (s *ServerStreamWithContext) SetHeader(md metadata.MD) error
func (*ServerStreamWithContext) SetTrailer ¶ added in v0.5.4
func (s *ServerStreamWithContext) SetTrailer(md metadata.MD)
type ServicePack ¶ added in v0.5.4
type ServicePack[T any] struct { // contains filtered or unexported fields }
func PackService ¶ added in v0.5.4
func PackService[T any](desc *grpc.ServiceDesc, impl T) ServicePack[T]
func (*ServicePack[T]) Unpack ¶ added in v0.5.4
func (s *ServicePack[T]) Unpack() (*grpc.ServiceDesc, any)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.