Documentation ¶
Index ¶
- Variables
- func GenDebugAttachmentName(pod, container string) string
- func NewApiEventLoop(emitter ApiEmitter, syncer ApiSyncer) eventloop.EventLoop
- func NewApiSimpleEventLoop(emitter ApiSimpleEmitter, syncers ...ApiSyncer) eventloop.SimpleEventLoop
- type ApiEmitter
- type ApiSimpleEmitter
- type ApiSnapshot
- type ApiSnapshotStringer
- type ApiSyncDeciderdeprecated
- type ApiSyncDeciderWithContext
- type ApiSyncer
- type ApiSyncers
- type DebugAttachment
- func (o *DebugAttachment) DeepCopyObject() runtime.Object
- func (*DebugAttachment) Descriptor() ([]byte, []int)
- func (this *DebugAttachment) Equal(that interface{}) bool
- func (m *DebugAttachment) GetContainer() string
- func (m *DebugAttachment) GetDebugNamespace() string
- func (m *DebugAttachment) GetDebugServerAddress() string
- func (m *DebugAttachment) GetDebugger() string
- func (m *DebugAttachment) GetImage() string
- func (m *DebugAttachment) GetMatchRequest() bool
- func (m *DebugAttachment) GetMetadata() core.Metadata
- func (m *DebugAttachment) GetNode() string
- func (o *DebugAttachment) GetObjectKind() schema.ObjectKind
- func (m *DebugAttachment) GetPlankName() string
- func (m *DebugAttachment) GetPod() string
- func (m *DebugAttachment) GetPortFromDebugServerAddress() (int, error)
- func (m *DebugAttachment) GetProcessName() string
- func (m *DebugAttachment) GetState() DebugAttachment_State
- func (m *DebugAttachment) GetStatus() core.Status
- func (r *DebugAttachment) GroupVersionKind() schema.GroupVersionKind
- func (r *DebugAttachment) Hash() uint64
- func (*DebugAttachment) ProtoMessage()
- func (m *DebugAttachment) Reset()
- func (r *DebugAttachment) SetMetadata(meta core.Metadata)
- func (r *DebugAttachment) SetStatus(status core.Status)
- func (m *DebugAttachment) String() string
- func (m *DebugAttachment) XXX_DiscardUnknown()
- func (m *DebugAttachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DebugAttachment) XXX_Merge(src proto.Message)
- func (m *DebugAttachment) XXX_Size() int
- func (m *DebugAttachment) XXX_Unmarshal(b []byte) error
- type DebugAttachmentClient
- func NewDebugAttachmentClient(rcFactory factory.ResourceClientFactory) (DebugAttachmentClient, error)
- func NewDebugAttachmentClientWithBase(rc clients.ResourceClient) DebugAttachmentClient
- func NewDebugAttachmentClientWithToken(rcFactory factory.ResourceClientFactory, token string) (DebugAttachmentClient, error)
- type DebugAttachmentList
- func (list DebugAttachmentList) AsInputResources() resources.InputResourceList
- func (list DebugAttachmentList) AsInterfaces() []interface{}
- func (list DebugAttachmentList) AsResources() resources.ResourceList
- func (list DebugAttachmentList) Clone() DebugAttachmentList
- func (list DebugAttachmentList) Each(f func(element *DebugAttachment))
- func (list DebugAttachmentList) EachResource(f func(element resources.Resource))
- func (list DebugAttachmentList) Find(namespace, name string) (*DebugAttachment, error)
- func (list DebugAttachmentList) Names() []string
- func (list DebugAttachmentList) NamespacesDotNames() []string
- func (list DebugAttachmentList) Sort() DebugAttachmentList
- type DebugAttachmentReconciler
- type DebugAttachmentWatcher
- type DebugAttachment_State
- type Intent
- func (*Intent) Descriptor() ([]byte, []int)
- func (this *Intent) Equal(that interface{}) bool
- func (di *Intent) GenerateLabels() map[string]string
- func (m *Intent) GetContainerName() string
- func (di *Intent) GetDebugAttachment(daClient DebugAttachmentClient) (*DebugAttachment, error)
- func (di *Intent) GetDebugAttachments(daClient DebugAttachmentClient) (DebugAttachmentList, error)
- func (m *Intent) GetDebugger() string
- func (m *Intent) GetPod() *core.ResourceRef
- func (m *Intent) GetProcessMatcher() string
- func (*Intent) ProtoMessage()
- func (m *Intent) Reset()
- func (m *Intent) String() string
- func (m *Intent) XXX_DiscardUnknown()
- func (m *Intent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Intent) XXX_Merge(src proto.Message)
- func (m *Intent) XXX_Size() int
- func (m *Intent) XXX_Unmarshal(b []byte) error
- type Plank
- func (*Plank) Descriptor() ([]byte, []int)
- func (this *Plank) Equal(that interface{}) bool
- func (m *Plank) GetPod() *core.ResourceRef
- func (m *Plank) GetReadyForConnect() bool
- func (*Plank) ProtoMessage()
- func (m *Plank) Reset()
- func (m *Plank) String() string
- func (m *Plank) XXX_DiscardUnknown()
- func (m *Plank) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Plank) XXX_Merge(src proto.Message)
- func (m *Plank) XXX_Size() int
- func (m *Plank) XXX_Unmarshal(b []byte) error
- type PortSpec
- func (*PortSpec) Descriptor() ([]byte, []int)
- func (this *PortSpec) Equal(that interface{}) bool
- func (m *PortSpec) GetPlank() string
- func (m *PortSpec) GetPortLocation() isPortSpec_PortLocation
- func (m *PortSpec) GetTarget() string
- func (*PortSpec) ProtoMessage()
- func (m *PortSpec) Reset()
- func (m *PortSpec) String() string
- func (m *PortSpec) XXX_DiscardUnknown()
- func (m *PortSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PortSpec) XXX_Merge(src proto.Message)
- func (*PortSpec) XXX_OneofWrappers() []interface{}
- func (m *PortSpec) XXX_Size() int
- func (m *PortSpec) XXX_Unmarshal(b []byte) error
- type PortSpec_Plank
- type PortSpec_Target
- type TransitionDebugAttachmentFunc
Constants ¶
This section is empty.
Variables ¶
var ( DebugAttachmentCrd = crd.NewCrd( "debugattachments", DebugAttachmentGVK.Group, DebugAttachmentGVK.Version, DebugAttachmentGVK.Kind, "debatt", false, &DebugAttachment{}) )
var (
DebugAttachmentGVK = schema.GroupVersionKind{
Version: "v1",
Group: "squash.solo.io",
Kind: "DebugAttachment",
}
)
var DebugAttachment_State_name = map[int32]string{
0: "RequestingAttachment",
1: "PendingAttachment",
2: "Attached",
3: "RequestingDelete",
4: "PendingDelete",
}
var DebugAttachment_State_value = map[string]int32{
"RequestingAttachment": 0,
"PendingAttachment": 1,
"Attached": 2,
"RequestingDelete": 3,
"PendingDelete": 4,
}
Functions ¶
func GenDebugAttachmentName ¶
TODO(mitchdraft) - this should error check for length TODO(mitchdraft) - this should include process id so that we can have multiple debuggers on the same container TODO(mitchdraft) - generated identifier should be applied as a label - the point is to make the resource queriable
func NewApiEventLoop ¶
func NewApiEventLoop(emitter ApiEmitter, syncer ApiSyncer) eventloop.EventLoop
func NewApiSimpleEventLoop ¶ added in v0.5.18
func NewApiSimpleEventLoop(emitter ApiSimpleEmitter, syncers ...ApiSyncer) eventloop.SimpleEventLoop
Types ¶
type ApiEmitter ¶
type ApiEmitter interface { Register() error DebugAttachment() DebugAttachmentClient Snapshots(watchNamespaces []string, opts clients.WatchOpts) (<-chan *ApiSnapshot, <-chan error, error) }
func NewApiEmitter ¶
func NewApiEmitter(debugAttachmentClient DebugAttachmentClient) ApiEmitter
func NewApiEmitterWithEmit ¶
func NewApiEmitterWithEmit(debugAttachmentClient DebugAttachmentClient, emit <-chan struct{}) ApiEmitter
type ApiSimpleEmitter ¶ added in v0.5.18
type ApiSimpleEmitter interface {
Snapshots(ctx context.Context) (<-chan *ApiSnapshot, <-chan error, error)
}
func NewApiSimpleEmitter ¶ added in v0.5.18
func NewApiSimpleEmitter(aggregatedWatch clients.ResourceWatch) ApiSimpleEmitter
func NewApiSimpleEmitterWithEmit ¶ added in v0.5.18
func NewApiSimpleEmitterWithEmit(aggregatedWatch clients.ResourceWatch, emit <-chan struct{}) ApiSimpleEmitter
type ApiSnapshot ¶
type ApiSnapshot struct {
Debugattachments DebugAttachmentList
}
func (ApiSnapshot) Clone ¶
func (s ApiSnapshot) Clone() ApiSnapshot
func (ApiSnapshot) Hash ¶
func (s ApiSnapshot) Hash() uint64
func (ApiSnapshot) HashFields ¶
func (s ApiSnapshot) HashFields() []zap.Field
func (ApiSnapshot) Stringer ¶
func (s ApiSnapshot) Stringer() ApiSnapshotStringer
type ApiSnapshotStringer ¶
func (ApiSnapshotStringer) String ¶
func (ss ApiSnapshotStringer) String() string
type ApiSyncDecider
deprecated
added in
v0.5.18
type ApiSyncDecider interface { ApiSyncer ShouldSync(old, new *ApiSnapshot) bool }
Deprecated: use ApiSyncDeciderWithContext
type ApiSyncDeciderWithContext ¶ added in v0.5.18
type ApiSyncDeciderWithContext interface { ApiSyncer ShouldSync(ctx context.Context, old, new *ApiSnapshot) bool }
type ApiSyncers ¶
type ApiSyncers []ApiSyncer
func (ApiSyncers) Sync ¶
func (s ApiSyncers) Sync(ctx context.Context, snapshot *ApiSnapshot) error
type DebugAttachment ¶
type DebugAttachment struct { Metadata core.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata"` Status core.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status" testdiff:"ignore"` PlankName string `protobuf:"bytes,3,opt,name=plank_name,json=plankName,proto3" json:"plank_name,omitempty"` Debugger string `protobuf:"bytes,4,opt,name=debugger,proto3" json:"debugger,omitempty"` Image string `protobuf:"bytes,5,opt,name=image,proto3" json:"image,omitempty"` ProcessName string `protobuf:"bytes,6,opt,name=process_name,json=processName,proto3" json:"process_name,omitempty"` Node string `protobuf:"bytes,7,opt,name=node,proto3" json:"node,omitempty"` MatchRequest bool `protobuf:"varint,8,opt,name=match_request,json=matchRequest,proto3" json:"match_request,omitempty"` DebugServerAddress string `protobuf:"bytes,9,opt,name=debug_server_address,json=debugServerAddress,proto3" json:"debug_server_address,omitempty"` Pod string `protobuf:"bytes,11,opt,name=pod,proto3" json:"pod,omitempty"` Container string `protobuf:"bytes,12,opt,name=container,proto3" json:"container,omitempty"` DebugNamespace string `protobuf:"bytes,13,opt,name=debug_namespace,json=debugNamespace,proto3" json:"debug_namespace,omitempty"` State DebugAttachment_State `protobuf:"varint,20,opt,name=state,proto3,enum=squash.solo.io.DebugAttachment_State" json:"state,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Attachments store the information needed for squash to coordinate a debugging session
func NewDebugAttachment ¶
func NewDebugAttachment(namespace, name string) *DebugAttachment
func (*DebugAttachment) DeepCopyObject ¶
func (o *DebugAttachment) DeepCopyObject() runtime.Object
func (*DebugAttachment) Descriptor ¶
func (*DebugAttachment) Descriptor() ([]byte, []int)
func (*DebugAttachment) Equal ¶
func (this *DebugAttachment) Equal(that interface{}) bool
func (*DebugAttachment) GetContainer ¶
func (m *DebugAttachment) GetContainer() string
func (*DebugAttachment) GetDebugNamespace ¶
func (m *DebugAttachment) GetDebugNamespace() string
func (*DebugAttachment) GetDebugServerAddress ¶
func (m *DebugAttachment) GetDebugServerAddress() string
func (*DebugAttachment) GetDebugger ¶
func (m *DebugAttachment) GetDebugger() string
func (*DebugAttachment) GetImage ¶
func (m *DebugAttachment) GetImage() string
func (*DebugAttachment) GetMatchRequest ¶
func (m *DebugAttachment) GetMatchRequest() bool
func (*DebugAttachment) GetMetadata ¶
func (m *DebugAttachment) GetMetadata() core.Metadata
func (*DebugAttachment) GetNode ¶
func (m *DebugAttachment) GetNode() string
func (*DebugAttachment) GetObjectKind ¶
func (o *DebugAttachment) GetObjectKind() schema.ObjectKind
func (*DebugAttachment) GetPlankName ¶
func (m *DebugAttachment) GetPlankName() string
func (*DebugAttachment) GetPod ¶
func (m *DebugAttachment) GetPod() string
func (*DebugAttachment) GetPortFromDebugServerAddress ¶
func (m *DebugAttachment) GetPortFromDebugServerAddress() (int, error)
func (*DebugAttachment) GetProcessName ¶
func (m *DebugAttachment) GetProcessName() string
func (*DebugAttachment) GetState ¶
func (m *DebugAttachment) GetState() DebugAttachment_State
func (*DebugAttachment) GetStatus ¶
func (m *DebugAttachment) GetStatus() core.Status
func (*DebugAttachment) GroupVersionKind ¶ added in v0.5.18
func (r *DebugAttachment) GroupVersionKind() schema.GroupVersionKind
func (*DebugAttachment) Hash ¶
func (r *DebugAttachment) Hash() uint64
func (*DebugAttachment) ProtoMessage ¶
func (*DebugAttachment) ProtoMessage()
func (*DebugAttachment) Reset ¶
func (m *DebugAttachment) Reset()
func (*DebugAttachment) SetMetadata ¶
func (r *DebugAttachment) SetMetadata(meta core.Metadata)
func (*DebugAttachment) SetStatus ¶
func (r *DebugAttachment) SetStatus(status core.Status)
func (*DebugAttachment) String ¶
func (m *DebugAttachment) String() string
func (*DebugAttachment) XXX_DiscardUnknown ¶
func (m *DebugAttachment) XXX_DiscardUnknown()
func (*DebugAttachment) XXX_Marshal ¶
func (m *DebugAttachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DebugAttachment) XXX_Merge ¶
func (m *DebugAttachment) XXX_Merge(src proto.Message)
func (*DebugAttachment) XXX_Size ¶
func (m *DebugAttachment) XXX_Size() int
func (*DebugAttachment) XXX_Unmarshal ¶
func (m *DebugAttachment) XXX_Unmarshal(b []byte) error
type DebugAttachmentClient ¶
type DebugAttachmentClient interface { BaseClient() clients.ResourceClient Register() error Read(namespace, name string, opts clients.ReadOpts) (*DebugAttachment, error) Write(resource *DebugAttachment, opts clients.WriteOpts) (*DebugAttachment, error) Delete(namespace, name string, opts clients.DeleteOpts) error List(namespace string, opts clients.ListOpts) (DebugAttachmentList, error) DebugAttachmentWatcher }
func NewDebugAttachmentClient ¶
func NewDebugAttachmentClient(rcFactory factory.ResourceClientFactory) (DebugAttachmentClient, error)
func NewDebugAttachmentClientWithBase ¶
func NewDebugAttachmentClientWithBase(rc clients.ResourceClient) DebugAttachmentClient
func NewDebugAttachmentClientWithToken ¶
func NewDebugAttachmentClientWithToken(rcFactory factory.ResourceClientFactory, token string) (DebugAttachmentClient, error)
type DebugAttachmentList ¶
type DebugAttachmentList []*DebugAttachment
func (DebugAttachmentList) AsInputResources ¶
func (list DebugAttachmentList) AsInputResources() resources.InputResourceList
func (DebugAttachmentList) AsInterfaces ¶
func (list DebugAttachmentList) AsInterfaces() []interface{}
func (DebugAttachmentList) AsResources ¶
func (list DebugAttachmentList) AsResources() resources.ResourceList
func (DebugAttachmentList) Clone ¶
func (list DebugAttachmentList) Clone() DebugAttachmentList
func (DebugAttachmentList) Each ¶
func (list DebugAttachmentList) Each(f func(element *DebugAttachment))
func (DebugAttachmentList) EachResource ¶ added in v0.5.18
func (list DebugAttachmentList) EachResource(f func(element resources.Resource))
func (DebugAttachmentList) Find ¶
func (list DebugAttachmentList) Find(namespace, name string) (*DebugAttachment, error)
namespace is optional, if left empty, names can collide if the list contains more than one with the same name
func (DebugAttachmentList) Names ¶
func (list DebugAttachmentList) Names() []string
func (DebugAttachmentList) NamespacesDotNames ¶
func (list DebugAttachmentList) NamespacesDotNames() []string
func (DebugAttachmentList) Sort ¶
func (list DebugAttachmentList) Sort() DebugAttachmentList
type DebugAttachmentReconciler ¶
type DebugAttachmentReconciler interface {
Reconcile(namespace string, desiredResources DebugAttachmentList, transition TransitionDebugAttachmentFunc, opts clients.ListOpts) error
}
func NewDebugAttachmentReconciler ¶
func NewDebugAttachmentReconciler(client DebugAttachmentClient) DebugAttachmentReconciler
type DebugAttachmentWatcher ¶ added in v0.5.18
type DebugAttachment_State ¶
type DebugAttachment_State int32
const ( // Newly created DebugAttachments have state RequestingAttachment DebugAttachment_RequestingAttachment DebugAttachment_State = 0 // When the event loop begins fullfilling an attachment request it sets // DebugAttachments state to PendingAttachment DebugAttachment_PendingAttachment DebugAttachment_State = 1 // When squash client successfully attaches, it sets state to Attached DebugAttachment_Attached DebugAttachment_State = 2 // Indicates that user has requested an attachment be removed DebugAttachment_RequestingDelete DebugAttachment_State = 3 // When the event loop begins fullfilling a delete request it sets this // status and triggers a cleanup routine // When the cleanup routine completes, it deletes the CRD DebugAttachment_PendingDelete DebugAttachment_State = 4 )
func (DebugAttachment_State) EnumDescriptor ¶
func (DebugAttachment_State) EnumDescriptor() ([]byte, []int)
func (DebugAttachment_State) String ¶
func (x DebugAttachment_State) String() string
type Intent ¶
type Intent struct { // type of debugger to use Debugger string `protobuf:"bytes,1,opt,name=debugger,proto3" json:"debugger,omitempty"` // pod to debug Pod *core.ResourceRef `protobuf:"bytes,2,opt,name=pod,proto3" json:"pod,omitempty"` // name of container to debug ContainerName string `protobuf:"bytes,3,opt,name=container_name,json=containerName,proto3" json:"container_name,omitempty"` // NOT YET IMPLEMENTED // if a container has multiple processes and you do not want to debug the first process, this string is used to select a specific process ProcessMatcher string `protobuf:"bytes,4,opt,name=process_matcher,json=processMatcher,proto3" json:"process_matcher,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Describes the user's debug intentions
func (*Intent) Descriptor ¶
func (*Intent) GenerateLabels ¶
func (*Intent) GetContainerName ¶
func (*Intent) GetDebugAttachment ¶
func (di *Intent) GetDebugAttachment(daClient DebugAttachmentClient) (*DebugAttachment, error)
For a given debug Intent, finds the corresponding DebugAttachment, errors if there is not exactly one match
func (*Intent) GetDebugAttachments ¶
func (di *Intent) GetDebugAttachments(daClient DebugAttachmentClient) (DebugAttachmentList, error)
For a given debug Intent, finds the corresponding DebugAttachments Note, under normal operation, there should only ever be on match. This function exists for handling possible error states.
func (*Intent) GetDebugger ¶
func (*Intent) GetPod ¶
func (m *Intent) GetPod() *core.ResourceRef
func (*Intent) GetProcessMatcher ¶
func (*Intent) ProtoMessage ¶
func (*Intent) ProtoMessage()
func (*Intent) XXX_DiscardUnknown ¶
func (m *Intent) XXX_DiscardUnknown()
func (*Intent) XXX_Marshal ¶
func (*Intent) XXX_Unmarshal ¶
type Plank ¶
type Plank struct { // plank pod reference Pod *core.ResourceRef `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"` // indicates when plank has completed the debugger-specify preparation ReadyForConnect bool `protobuf:"varint,2,opt,name=ready_for_connect,json=readyForConnect,proto3" json:"ready_for_connect,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Describes the pod squash spawns for managing a particular debug session
func (*Plank) Descriptor ¶
func (*Plank) GetPod ¶
func (m *Plank) GetPod() *core.ResourceRef
func (*Plank) GetReadyForConnect ¶
func (*Plank) ProtoMessage ¶
func (*Plank) ProtoMessage()
func (*Plank) XXX_DiscardUnknown ¶
func (m *Plank) XXX_DiscardUnknown()
func (*Plank) XXX_Marshal ¶
func (*Plank) XXX_Unmarshal ¶
type PortSpec ¶
type PortSpec struct { // Types that are valid to be assigned to PortLocation: // *PortSpec_Plank // *PortSpec_Target PortLocation isPortSpec_PortLocation `protobuf_oneof:"port_location"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Contains port information needed to connect or find a debugger
func (*PortSpec) Descriptor ¶
func (*PortSpec) GetPortLocation ¶
func (m *PortSpec) GetPortLocation() isPortSpec_PortLocation
func (*PortSpec) ProtoMessage ¶
func (*PortSpec) ProtoMessage()
func (*PortSpec) XXX_DiscardUnknown ¶
func (m *PortSpec) XXX_DiscardUnknown()
func (*PortSpec) XXX_Marshal ¶
func (*PortSpec) XXX_OneofWrappers ¶ added in v0.5.19
func (*PortSpec) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*PortSpec) XXX_Unmarshal ¶
type PortSpec_Plank ¶
type PortSpec_Plank struct {
Plank string `protobuf:"bytes,1,opt,name=plank,proto3,oneof"`
}
func (*PortSpec_Plank) Equal ¶
func (this *PortSpec_Plank) Equal(that interface{}) bool
type PortSpec_Target ¶
type PortSpec_Target struct {
Target string `protobuf:"bytes,2,opt,name=target,proto3,oneof"`
}
func (*PortSpec_Target) Equal ¶
func (this *PortSpec_Target) Equal(that interface{}) bool
type TransitionDebugAttachmentFunc ¶
type TransitionDebugAttachmentFunc func(original, desired *DebugAttachment) (bool, error)
Option to copy anything from the original to the desired before writing. Return value of false means don't update