Documentation
¶
Index ¶
- func Init(ctx context.Context, config *types.Config)
- type Store
- func (c *Store) GetClient() pb.CoreRPCClient
- func (c *Store) GetIdentifier(ctx context.Context) string
- func (c *Store) GetNode(ctx context.Context, nodename string) (*types.Node, error)
- func (c *Store) GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error)
- func (c *Store) ListPodNodes(ctx context.Context, all bool, podname string, labels map[string]string) ([]*types.Node, error)
- func (c *Store) NodeStatusStream(ctx context.Context) (<-chan *types.NodeStatus, <-chan error)
- func (c *Store) SetNodeStatus(ctx context.Context, ttl int64) error
- func (c *Store) SetWorkloadStatus(ctx context.Context, status *types.WorkloadStatus, ttl int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store use core to store meta
func (*Store) GetClient ¶
func (c *Store) GetClient() pb.CoreRPCClient
GetClient returns a gRPC client
func (*Store) GetIdentifier ¶
GetIdentifier returns the identifier of core
func (*Store) GetNodeStatus ¶
GetNodeStatus gets the status of node
func (*Store) ListPodNodes ¶
func (c *Store) ListPodNodes(ctx context.Context, all bool, podname string, labels map[string]string) ([]*types.Node, error)
ListPodNodes list nodes by given conditions, note that not all the fields are filled.
func (*Store) NodeStatusStream ¶
NodeStatusStream watches the changes of node status
func (*Store) SetNodeStatus ¶
SetNodeStatus reports the status of node SetNodeStatus always reports alive status, when not alive, TTL will cause expiration of node
func (*Store) SetWorkloadStatus ¶
func (c *Store) SetWorkloadStatus(ctx context.Context, status *types.WorkloadStatus, ttl int64) error
SetWorkloadStatus deploy containers
Click to show internal directories.
Click to hide internal directories.