Documentation
¶
Overview ¶
Package clusterstatus provides a set of primitives to compose the SetStatusInCluster RPC Response
Index ¶
- Variables
- type NotAnObjectError
- type SetStatusInClusterResponseBuilder
- func (s SetStatusInClusterResponseBuilder) JSONStatusResponse(obj any) (*operator.SetStatusInClusterResponse, error)
- func (s SetStatusInClusterResponseBuilder) NoOpResponse() *operator.SetStatusInClusterResponse
- func (s SetStatusInClusterResponseBuilder) SetEmptyStatusResponse() *operator.SetStatusInClusterResponse
Constants ¶
This section is empty.
Variables ¶
var ErrNilObject = errors.New("nil object passed, use NoOpResponse")
ErrNilObject is used when a nil object is passed to the builder.
Functions ¶
This section is empty.
Types ¶
type NotAnObjectError ¶
type NotAnObjectError struct {
// contains filtered or unexported fields
}
NotAnObjectError is used when the passed value cannot be represented as a JSON object.
func (NotAnObjectError) Error ¶
func (err NotAnObjectError) Error() string
type SetStatusInClusterResponseBuilder ¶
type SetStatusInClusterResponseBuilder struct{}
SetStatusInClusterResponseBuilder a SetStatus response builder.
func NewSetStatusInClusterResponseBuilder ¶
func NewSetStatusInClusterResponseBuilder() *SetStatusInClusterResponseBuilder
NewSetStatusInClusterResponseBuilder is an helper that creates the SetStatus endpoint responses.
func (SetStatusInClusterResponseBuilder) JSONStatusResponse ¶
func (s SetStatusInClusterResponseBuilder) JSONStatusResponse(obj any) (*operator.SetStatusInClusterResponse, error)
JSONStatusResponse requires a struct or map that can be translated to a JSON object, will set the status to the passed object.
func (SetStatusInClusterResponseBuilder) NoOpResponse ¶
func (s SetStatusInClusterResponseBuilder) NoOpResponse() *operator.SetStatusInClusterResponse
NoOpResponse this response will ensure that no changes will be done to the plugin status.
func (SetStatusInClusterResponseBuilder) SetEmptyStatusResponse ¶
func (s SetStatusInClusterResponseBuilder) SetEmptyStatusResponse() *operator.SetStatusInClusterResponse
SetEmptyStatusResponse will set the plugin status to an empty object '{}'.