Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is Pod Resources API client.
func NewClient ¶
func NewClient(options ...ClientOption) (*Client, error)
NewClient creates a new Pod Resources API client with the given options.
type ClientOption ¶
type ClientOption func(*Client)
ClientOption is an option for the client.
func WithClientConn ¶
func WithClientConn(conn *grpc.ClientConn) ClientOption
WithClientConn sets a pre-created gRPC connection for the client.
func WithSocketPath ¶
func WithSocketPath(path string) ClientOption
WithSocketPath sets the kubelet socket path to connect to.
type ContainerResources ¶
type ContainerResources struct {
*api.ContainerResources
}
ContainerResources contains resources for a single container.
func (*ContainerResources) GetDeviceTopologyHints ¶
func (r *ContainerResources) GetDeviceTopologyHints(checkDenied func(string) bool) topology.Hints
GetDeviceTopologyHints returns topology hints for the given container. checkDenied is used to filter out hints that are disallowed.
type PodResources ¶
type PodResources struct {
*api.PodResources
}
PodResources contains resources for a pod.
func (*PodResources) GetContainer ¶
func (p *PodResources) GetContainer(ctr string) *ContainerResources
GetContainer returns resources for the given container.
type PodResourcesList ¶
type PodResourcesList struct {
// contains filtered or unexported fields
}
PodResourcesList containers the result of a pod resources list query.
func NewPodResourcesList ¶
func NewPodResourcesList(l []*api.PodResources) *PodResourcesList
func (*PodResourcesList) GetContainer ¶
func (l *PodResourcesList) GetContainer(ns, pod, ctr string) *ContainerResources
GetContainer returns resources for the given container.
func (*PodResourcesList) GetPodResources ¶
func (l *PodResourcesList) GetPodResources(ns, pod string) *PodResources
GetPodResources returns resources for the given pod.
func (*PodResourcesList) Len ¶
func (l *PodResourcesList) Len() int