api_helpers

package
v0.0.0-...-8b3bf69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLOW_EVENT          = ui.EventType_FLOW
	FLOWS_EVENT         = ui.EventType_FLOWS
	NS_STATE_EVENT      = ui.EventType_K8S_NAMESPACE_STATE
	SERVICE_STATE_EVENT = ui.EventType_SERVICE_STATE
	SERVICE_LINK_EVENT  = ui.EventType_SERVICE_LINK_STATE
	STATUS_EVENT        = ui.EventType_STATUS
)

Variables

This section is empty.

Functions

func EventFromFlows

func EventFromFlows(f []*flow.Flow) *ui.Event

func EventFromLinkResult

func EventFromLinkResult(l cache.Result[*link.Link]) *ui.Event

func EventFromServiceResult

func EventFromServiceResult(s cache.Result[*service.Service]) *ui.Event

func EventResponseFromEverything

func EventResponseFromEverything(
	flows []*flow.Flow,
	links []cache.Result[*link.Link],
	svcs []cache.Result[*service.Service],
) *ui.GetEventsResponse

func EventResponseFromNSEvent

func EventResponseFromNSEvent(e *common.NSEvent) *ui.GetEventsResponse

func EventResponseFromServerStatus

func EventResponseFromServerStatus(
	fullStatus *statuschecker.FullStatus,
) *ui.GetEventsResponse

func EventResponseFromStatusResponse

func EventResponseFromStatusResponse(
	st *ui.GetStatusResponse,
) *ui.GetEventsResponse

func IsK8sResourceNotFound

func IsK8sResourceNotFound(err error) bool

func IsK8sResourcePermissionsError

func IsK8sResourcePermissionsError(err error) bool

func IsServiceUnavailable

func IsServiceUnavailable(err error) bool

func IsTimeout

func IsTimeout(err error) bool

func ServerStatusNotification

func ServerStatusNotification(
	fullStatus *statuschecker.FullStatus,
) *ui.Notification

func StateChangeFromEventKind

func StateChangeFromEventKind(cflags events.EventKind) ui.StateChange

func StatusResponseFromServerStatus

func StatusResponseFromServerStatus(
	fullStatus *statuschecker.FullStatus,
) *ui.GetStatusResponse

Types

type EventFlags

type EventFlags struct {
	Flow            bool
	Flows           bool
	Services        bool
	ServiceLinks    bool
	Namespaces      bool
	Status          bool
	NetworkPolicies bool
}

func GetFlagsWhichEventsRequested

func GetFlagsWhichEventsRequested(events []ui.EventType) *EventFlags

func (*EventFlags) FlowsRequired

func (ef *EventFlags) FlowsRequired() bool

func (*EventFlags) StatusRequired

func (ef *EventFlags) StatusRequired() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL