Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTypeResolver(key string, resolver func(string) (Resource, error))
- type AdhocRequest
- type Asset
- type ByExecuted
- type Check
- type CheckConfig
- type CheckHistory
- type CheckRequest
- type Claims
- type ClusterHealth
- type ClusterRole
- type ClusterRoleBinding
- type ConstrainedResource
- type Deregistration
- type Entity
- type Event
- type EventFilter
- type Extension
- type Handler
- type HandlerSocket
- type HealthResponse
- type Hook
- type HookConfig
- type HookList
- type KeepaliveRecord
- type MetricPoint
- type MetricTag
- type Metrics
- type MultitenantResource
- type Mutator
- type Namespace
- type Network
- type NetworkInterface
- type ObjectMeta
- type ProxyRequests
- type Queue
- type QueueGetter
- type QueueItem
- type Resource
- type Ring
- type RingGetter
- type Role
- type RoleBinding
- type RoleRef
- type Rule
- type Silenced
- type Subject
- type System
- type TLSOptions
- type TimeWindowDays
- type TimeWindowTimeRange
- type TimeWindowWhen
- type Tokens
- type TypeMeta
- type User
- type Wrapper
Constants ¶
View Source
const ( // AccessTokenString is the key name used to retrieve the access token string AccessTokenString = v2.AccessTokenString // AccessTokenClaims contains the key name to retrieve the access token claims AccessTokenClaims = v2.AccessTokenClaims // ClaimsKey contains key name to retrieve the jwt claims from context ClaimsKey = v2.ClaimsKey // NamespaceKey contains the key name to retrieve the namespace from context NamespaceKey = v2.NamespaceKey // PageContinueKey contains the continue token used in pagination PageContinueKey = v2.PageContinueKey // PageSizeKey contains the page size used in pagination PageSizeKey = v2.PageSizeKey // RefreshTokenClaims contains the key name to retrieve the refresh token claims RefreshTokenClaims = v2.RefreshTokenClaims // RefreshTokenString contains the key name to retrieve the refresh token string RefreshTokenString = v2.RefreshTokenString // AuthorizationAttributesKey is the key name used to store authorization // attributes extracted from a request = v2.// AuthorizationAttributesKey = v2.AuthorizationAttributesKey // StoreKey contains the key name to retrieve the etcd store from within a context = v2.// StoreKey = v2.StoreKey // ResourceAll represents all possible resources ResourceAll = v2.ResourceAll // VerbAll represents all possible verbs VerbAll = v2.VerbAll // GroupType represents a group object in a subject GroupType = v2.GroupType // UserType represents a user object in a subject UserType = v2.UserType // LocalSelfUserResource represents a local user trying to view itself // or change its password LocalSelfUserResource = v2.LocalSelfUserResource // HandlerPipeType represents handlers that pipes event data // into arbitrary // commands via STDIN HandlerPipeType = v2.HandlerPipeType // HandlerSetType represents handlers that groups event handlers, making it // easy to manage groups of actions that should be executed for certain v2 // of events. HandlerSetType = v2.HandlerSetType // HandlerTCPType represents handlers that send event data to a remote TCP // socket HandlerTCPType = v2.HandlerTCPType // HandlerUDPType represents handlers that send event data to a remote UDP // socket HandlerUDPType = v2.HandlerUDPType // HandlerGRPCType is a special kind of handler that represents an extension HandlerGRPCType = v2.HandlerGRPCType // EventFilterActionAllow is an action to allow events to pass through to the pipeline EventFilterActionAllow = v2.EventFilterActionAllow // EventFilterActionDeny is an action to deny events from passing through to the pipeline EventFilterActionDeny = v2.EventFilterActionDeny // DefaultEventFilterAction is the default action for filters DefaultEventFilterAction = v2.DefaultEventFilterAction // EntityAgentClass is the name of the class given to agent entities. EntityAgentClass = v2.EntityAgentClass // EntityProxyClass is the name of the class given to proxy entities. EntityProxyClass = v2.EntityProxyClass // EntityBackendClass is the name of the class given to backend entities. EntityBackendClass = v2.EntityBackendClass // Redacted is filled in for fields that contain sensitive information Redacted = v2.Redacted EventFailingState = v2.EventFailingState // EventFlappingState indicates a rapid change in check result status EventFlappingState = v2.EventFlappingState // EventPassingState indicates successful check result status EventPassingState = v2.EventPassingState // CheckRequestType is the message type string for check request. CheckRequestType = v2.CheckRequestType // DefaultSplayCoverage is the default splay coverage for proxy check requests DefaultSplayCoverage = v2.DefaultSplayCoverage // NagiosOutputMetricFormat is the accepted string to represent the output metric format of // Nagios Perf Data NagiosOutputMetricFormat = v2.NagiosOutputMetricFormat // GraphiteOutputMetricFormat is the accepted string to represent the output metric format of // Graphite Plain Text GraphiteOutputMetricFormat = v2.GraphiteOutputMetricFormat // OpenTSDBOutputMetricFormat is the accepted string to represent the output metric format of // OpenTSDB Line OpenTSDBOutputMetricFormat = v2.OpenTSDBOutputMetricFormat // InfluxDBOutputMetricFormat is the accepted string to represent the output metric format of // InfluxDB Line InfluxDBOutputMetricFormat = v2.InfluxDBOutputMetricFormat // CoreEdition represents the Sensu Core Edition (CE) CoreEdition = v2.CoreEdition // EditionHeader represents the HTTP header containing the edition value EditionHeader = v2.EditionHeader // NamespaceTypeAll matches all actions NamespaceTypeAll = v2.NamespaceTypeAll DefaultKeepaliveTimeout = v2.DefaultKeepaliveTimeout )
Variables ¶
View Source
var ( FixtureCheckRequest = v2.FixtureCheckRequest FixtureCheckConfig = v2.FixtureCheckConfig FixtureCheck = v2.FixtureCheck FixtureProxyRequests = v2.FixtureProxyRequests FixtureNamespace = v2.FixtureNamespace FixtureMetrics = v2.FixtureMetrics FixtureMetricPoint = v2.FixtureMetricPoint FixtureMetricTag = v2.FixtureMetricTag FixtureHandler = v2.FixtureHandler FixtureSocketHandler = v2.FixtureSocketHandler FixtureSetHandler = v2.FixtureSetHandler FixtureUser = v2.FixtureUser FixtureHealthResponse = v2.FixtureHealthResponse FixtureEvent = v2.FixtureEvent FixtureEventFilter = v2.FixtureEventFilter FixtureDenyEventFilter = v2.FixtureDenyEventFilter FixtureExtension = v2.FixtureExtension FixtureMutator = v2.FixtureMutator FixtureAsset = v2.FixtureAsset FixtureSubject = v2.FixtureSubject FixtureRule = v2.FixtureRule FixtureRole = v2.FixtureRole FixtureRoleRef = v2.FixtureRoleRef FixtureRoleBinding = v2.FixtureRoleBinding FixtureClusterRole = v2.FixtureClusterRole FixtureClusterRoleBinding = v2.FixtureClusterRoleBinding FixtureEntity = v2.FixtureEntity FixtureHookConfig = v2.FixtureHookConfig FixtureHook = v2.FixtureHook FixtureHookList = v2.FixtureHookList FixtureSilenced = v2.FixtureSilenced FixtureAdhocRequest = v2.FixtureAdhocRequest FixtureTokens = v2.FixtureTokens )
Test fixture
View Source
var ( SetContextFromResource = v2.SetContextFromResource NewKeepaliveRecord = v2.NewKeepaliveRecord GetEntitySubscription = v2.GetEntitySubscription OutputMetricFormats = v2.OutputMetricFormats ContextNamespace = v2.ContextNamespace NewCheck = v2.NewCheck CommonCoreResources = v2.CommonCoreResources SilencedName = v2.SilencedName FakeHandlerCommand = v2.FakeHandlerCommand FakeMutatorCommand = v2.FakeMutatorCommand ValidateName = v2.ValidateName SortCheckConfigsByPredicate = v2.SortCheckConfigsByPredicate SortCheckConfigsByName = v2.SortCheckConfigsByName SortEntitiesByPredicate = v2.SortEntitiesByPredicate SortEntitiesByID = v2.SortEntitiesByID SortEntitiesByLastSeen = v2.SortEntitiesByLastSeen SortHandlersByPredicate = v2.SortHandlersByPredicate SortHandlersByName = v2.SortHandlersByName SortSilencedByPredicate = v2.SortSilencedByPredicate SortSilencedByName = v2.SortSilencedByName SortSilencedByBegin = v2.SortSilencedByBegin DefaultRedactFields = v2.DefaultRedactFields EventsBySeverity = v2.EventsBySeverity EventsByTimestamp = v2.EventsByTimestamp EventsByLastOk = v2.EventsByLastOk EventFilterAllActions = v2.EventFilterAllActions ValidateOutputMetricFormat = v2.ValidateOutputMetricFormat )
Misc functions and vars
Functions ¶
Types ¶
type AdhocRequest ¶
type AdhocRequest = v2.AdhocRequest
type ByExecuted ¶
type ByExecuted = v2.ByExecuted
type CheckConfig ¶
type CheckConfig = v2.CheckConfig
type CheckHistory ¶
type CheckHistory = v2.CheckHistory
type CheckRequest ¶
type CheckRequest = v2.CheckRequest
type ClusterHealth ¶
type ClusterHealth = v2.ClusterHealth
type ClusterRole ¶
type ClusterRole = v2.ClusterRole
type ClusterRoleBinding ¶
type ClusterRoleBinding = v2.ClusterRoleBinding
type ConstrainedResource ¶
type ConstrainedResource = v2.ConstrainedResource
type Deregistration ¶
type Deregistration = v2.Deregistration
type EventFilter ¶
type EventFilter = v2.EventFilter
type HandlerSocket ¶
type HandlerSocket = v2.HandlerSocket
type HealthResponse ¶
type HealthResponse = v2.HealthResponse
type HookConfig ¶
type HookConfig = v2.HookConfig
type KeepaliveRecord ¶
type KeepaliveRecord = v2.KeepaliveRecord
type MetricPoint ¶
type MetricPoint = v2.MetricPoint
type MultitenantResource ¶
type MultitenantResource = v2.MultitenantResource
type NetworkInterface ¶
type NetworkInterface = v2.NetworkInterface
type ObjectMeta ¶
type ObjectMeta = v2.ObjectMeta
type ProxyRequests ¶
type ProxyRequests = v2.ProxyRequests
type Queue ¶
type Queue interface { // Enqueue adds a new item to the queue. It returns any error that // was encountered in doing so, or if the context is cancelled. Enqueue(ctx context.Context, value string) error // Dequeue gets an Item from the queue. It returns the Item and any // error encountered, or if the context is cancelled. Dequeue(ctx context.Context) (QueueItem, error) }
Queue is the interface of a queue. Queue's methods are atomic and goroutine-safe.
type QueueGetter ¶
QueueGetter is a type that provides a way to get a Queue.
type QueueItem ¶
type QueueItem interface { // Value is the item's underlying value. Value() string // Ack acks the item. The item will no longer be stored. Ack(context.Context) error // Nack nacks the item. The item will return to the Queue. Nack(context.Context) error }
QueueItem represents an item retrieved from a Queue.
type Ring ¶
type Ring interface { // Add adds an item to the ring. It returns a non-nil error if the // operation failed, or the context is cancelled before the operation // completed. Add(ctx context.Context, value string) error // Remove removes an item from the ring. It returns a non-nil error if the // operation failed, or the context is cancelled before the operation // completed. Remove(ctx context.Context, value string) error // Next gets the next item in the Ring. The other items in the Ring will // all be returned by subsequent calls to Next before this item is // returned again. Next returns the selected value, and an error indicating // if the operation failed, or if the context was cancelled. Next(context.Context) (string, error) }
Ring is the interface of a ring. Ring's methods are atomic and goroutine-safe.
type RingGetter ¶
RingGetter provides a way to get a Ring.
type RoleBinding ¶
type RoleBinding = v2.RoleBinding
type TLSOptions ¶
type TLSOptions = v2.TLSOptions
type TimeWindowDays ¶
type TimeWindowDays = v2.TimeWindowDays
type TimeWindowTimeRange ¶
type TimeWindowTimeRange = v2.TimeWindowTimeRange
type TimeWindowWhen ¶
type TimeWindowWhen = v2.TimeWindowWhen
type Wrapper ¶
type Wrapper struct { TypeMeta ObjectMeta ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` // Value is a valid Resource of concrete type Type. Value Resource `json:"spec" yaml:"spec"` }
Wrapper is a generic wrapper, with a type field for distinguishing its contents.
func WrapResource ¶
WrapResource wraps a Resource in a Wrapper that contains TypeMeta and ObjectMeta.
func (*Wrapper) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
Click to show internal directories.
Click to hide internal directories.