util

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ValidTargets specifies resource types allowed as a target:
	// target resource on an inbound query
	// target resource on an outbound 'to' query
	// destination resource on an outbound 'from' query
	ValidTargets = []string{
		k8s.Deployments,
		k8s.Namespaces,
		k8s.Pods,
		k8s.ReplicationControllers,
		k8s.Authorities,
	}

	// ValidDestinations specifies resource types allowed as a destination:
	// destination resource on an outbound 'to' query
	// target resource on an outbound 'from' query
	ValidDestinations = []string{
		k8s.Deployments,
		k8s.Namespaces,
		k8s.Pods,
		k8s.ReplicationControllers,
		k8s.Services,
	}
)

Functions

func BuildResource

func BuildResource(namespace string, args ...string) (pb.Resource, error)

BuildResource parses input strings, typically from CLI flags, to build a Resource object for use in the Conduit Public API.

func GRPCError

func GRPCError(err error) error

GRPCError generates a gRPC error code, as defined in google.golang.org/grpc/status. If the error is nil or already a gRPC error, return the error. If the error is of type k8s.io/apimachinery/pkg/apis/meta/v1#StatusReason, attempt to map the reason to a gRPC error.

Types

type StatSummaryRequestParams

type StatSummaryRequestParams struct {
	TimeWindow    string
	Namespace     string
	ResourceType  string
	ResourceName  string
	ToNamespace   string
	ToType        string
	ToName        string
	FromNamespace string
	FromType      string
	FromName      string
	AllNamespaces bool
}

Jump to

Keyboard shortcuts

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