Documentation
¶
Index ¶
- type Changeset
- type ChangesetPayload
- type Controller
- type ControllerPayload
- type CronJob
- type CronJobPayload
- type Deployment
- type DeploymentPayload
- type HostPortMixin
- type KeyPayload
- type KeyType
- func (d KeyType[T, TP]) Equal(other KeyType[T, TP]) bool
- func (d KeyType[T, TP]) GoString() string
- func (d KeyType[T, TP]) IsZero() bool
- func (d KeyType[T, TP]) Kind() string
- func (d KeyType[T, TP]) MarshalText() ([]byte, error)
- func (d *KeyType[T, TP]) Scan(src any) error
- func (d KeyType[T, TP]) String() string
- func (d *KeyType[T, TP]) UnmarshalText(bytes []byte) error
- func (d KeyType[T, TP]) Value() (driver.Value, error)
- type Origin
- type Request
- type RequestKeyPayload
- type Runner
- type RunnerPayload
- type SubscriberKey
- type SubscriberPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changeset ¶ added in v0.435.0
type Changeset = KeyType[ChangesetPayload, *ChangesetPayload]
func NewChangesetKey ¶ added in v0.435.0
func NewChangesetKey() Changeset
func ParseChangesetKey ¶ added in v0.435.0
type ChangesetPayload ¶ added in v0.435.0
type ChangesetPayload struct { // Content is just included to make the payload non-empty. // Non empty payloads do not work with go2proto Content string }
func (*ChangesetPayload) Kind ¶ added in v0.435.0
func (c *ChangesetPayload) Kind() string
func (*ChangesetPayload) Parse ¶ added in v0.435.0
func (c *ChangesetPayload) Parse(parts []string) error
func (*ChangesetPayload) RandomBytes ¶ added in v0.435.0
func (c *ChangesetPayload) RandomBytes() int
func (*ChangesetPayload) String ¶ added in v0.435.0
func (c *ChangesetPayload) String() string
type Controller ¶
type Controller = KeyType[ControllerPayload, *ControllerPayload]
func NewControllerKey ¶
func NewControllerKey(hostname, port string) Controller
func NewLocalControllerKey ¶
func NewLocalControllerKey(suffix int) Controller
func ParseControllerKey ¶
func ParseControllerKey(key string) (Controller, error)
type ControllerPayload ¶
type ControllerPayload struct {
HostPortMixin
}
func (*ControllerPayload) Kind ¶
func (c *ControllerPayload) Kind() string
type CronJob ¶
type CronJob = KeyType[CronJobPayload, *CronJobPayload]
func NewCronJobKey ¶
func ParseCronJobKey ¶
type CronJobPayload ¶
func (*CronJobPayload) Kind ¶
func (d *CronJobPayload) Kind() string
func (*CronJobPayload) Parse ¶
func (d *CronJobPayload) Parse(parts []string) error
func (*CronJobPayload) RandomBytes ¶
func (d *CronJobPayload) RandomBytes() int
func (*CronJobPayload) String ¶
func (d *CronJobPayload) String() string
type Deployment ¶
type Deployment = KeyType[DeploymentPayload, *DeploymentPayload]
func NewDeploymentKey ¶
func NewDeploymentKey(module string) Deployment
func ParseDeploymentKey ¶
func ParseDeploymentKey(key string) (Deployment, error)
type DeploymentPayload ¶
type DeploymentPayload struct {
Module string
}
func (*DeploymentPayload) Kind ¶
func (d *DeploymentPayload) Kind() string
func (*DeploymentPayload) Parse ¶
func (d *DeploymentPayload) Parse(parts []string) error
func (*DeploymentPayload) RandomBytes ¶
func (d *DeploymentPayload) RandomBytes() int
func (*DeploymentPayload) String ¶
func (d *DeploymentPayload) String() string
type HostPortMixin ¶
HostPortMixin is a mixin for keys that have an (optional) hostname and a port.
func (*HostPortMixin) Parse ¶
func (h *HostPortMixin) Parse(parts []string) error
func (*HostPortMixin) RandomBytes ¶
func (h *HostPortMixin) RandomBytes() int
func (*HostPortMixin) String ¶
func (h *HostPortMixin) String() string
type KeyPayload ¶
type KeyPayload interface { Kind() string String() string // Parse the hyphen-separated parts of the payload Parse(parts []string) error // RandomBytes determines the number of random bytes the key should include. RandomBytes() int }
KeyPayload is an interface that all key payloads must implement.
type KeyType ¶
type KeyType[T comparable, TP keyPayloadConstraint[T]] struct { Payload T Suffix string }
KeyType is a helper type to avoid having to write a bunch of boilerplate.
func (KeyType[T, TP]) MarshalText ¶
func (*KeyType[T, TP]) UnmarshalText ¶
type Request ¶
type Request = KeyType[RequestKeyPayload, *RequestKeyPayload]
A Request represents an inbound request into the cluster.
func NewRequestKey ¶
func ParseRequestKey ¶
type RequestKeyPayload ¶
func (*RequestKeyPayload) Kind ¶
func (r *RequestKeyPayload) Kind() string
func (*RequestKeyPayload) Parse ¶
func (r *RequestKeyPayload) Parse(parts []string) error
func (*RequestKeyPayload) RandomBytes ¶
func (r *RequestKeyPayload) RandomBytes() int
func (*RequestKeyPayload) String ¶
func (r *RequestKeyPayload) String() string
type Runner ¶
type Runner = KeyType[RunnerPayload, *RunnerPayload]
func NewLocalRunnerKey ¶
func NewRunnerKey ¶
func ParseRunnerKey ¶
type RunnerPayload ¶
type RunnerPayload struct {
HostPortMixin
}
func (*RunnerPayload) Kind ¶
func (r *RunnerPayload) Kind() string
type SubscriberKey ¶
type SubscriberKey = KeyType[SubscriberPayload, *SubscriberPayload]
func NewSubscriberKey ¶
func NewSubscriberKey(module, subscription, sink string) SubscriberKey
func ParseSubscriberKey ¶
func ParseSubscriberKey(key string) (SubscriberKey, error)
type SubscriberPayload ¶
func (*SubscriberPayload) Kind ¶
func (s *SubscriberPayload) Kind() string
func (*SubscriberPayload) Parse ¶
func (s *SubscriberPayload) Parse(parts []string) error
func (*SubscriberPayload) RandomBytes ¶
func (s *SubscriberPayload) RandomBytes() int
func (*SubscriberPayload) String ¶
func (s *SubscriberPayload) String() string
Click to show internal directories.
Click to hide internal directories.