edgecluster

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

packae edgecluster implements used edge cluster related types in the GraphQL transport layer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonResolverCreatorContract added in v0.6.1

type CommonResolverCreatorContract interface {
	// NewObjectMetaResolver creates new instance of the ObjectMetaResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// metadata: Mandatory. Contains the object metadata.
	// Returns the new instance or error if something goes wrong
	NewObjectMetaResolver(
		ctx context.Context,
		metadata *edgeclusterGrpcContract.ObjectMeta) (ObjectMetaResolverContract, error)

	// NewPortStatusResolverContract creates new instance of the PortStatusResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// portStatus: Mandatory. Contains the object portStatus.
	// Returns the new instance or error if something goes wrong
	NewPortStatusResolverContract(
		ctx context.Context,
		portStatus *edgeclusterGrpcContract.PortStatus) (PortStatusResolverContract, error)

	// NewLoadBalancerIngressResolver creates new instance of the loadBalancerIngressResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// loadBalancerIngress: Mandatory. The load balancer ingress details
	// Returns the new instance or error if something goes wrong
	NewLoadBalancerIngressResolver(
		ctx context.Context,
		loadBalancerIngress *edgeclusterGrpcContract.LoadBalancerIngress) (LoadBalancerIngressResolverContract, error)

	// NewLoadBalancerStatusResolver creates new instance of the loadBalancerStatusResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewLoadBalancerStatusResolver(
		ctx context.Context,
		loadBalancerStatus *edgeclusterGrpcContract.LoadBalancerStatus) (LoadBalancerStatusResolverContract, error)

	// NewServiceConditionResolver creates new instance of the ServiceConditionResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// serviceCondition: Mandatory. Contains condition information for a service.
	// Returns the new instance or error if something goes wrong
	NewServiceConditionResolver(
		ctx context.Context,
		serviceCondition *edgeclusterGrpcContract.ServiceCondition) (ServiceConditionResolverContract, error)

	// NewServiceSpecResolver creates new instance of the ServiceSpecResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// serviceSpec: Mandatory. Contains spec information for a service.
	// Returns the new instance or error if something goes wrong
	NewServiceSpecResolver(
		ctx context.Context,
		serviceSpec *edgeclusterGrpcContract.ServiceSpec) (ServiceSpecResolverContract, error)
}

type CreateEdgeClusterContract

type CreateEdgeClusterContract interface {
	// MutateAndGetPayload creates a new edge cluster and returns the payload contains the result of creating a new edge cluster
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the input argument contains edge cluster information to create
	// Returns the new edge cluster payload or error if something goes wrong
	MutateAndGetPayload(
		ctx context.Context,
		args CreateEdgeClusterInputArgument) (CreateEdgeClusterPayloadResolverContract, error)
}

CreateEdgeClusterContract declares the type to use when creating a new edge cluster

type CreateEdgeClusterInput

type CreateEdgeClusterInput struct {
	ProjectID        graphql.ID
	Name             string
	ClusterSecret    string
	ClusterType      string
	ClientMutationId *string
}

type CreateEdgeClusterInputArgument

type CreateEdgeClusterInputArgument struct {
	Input CreateEdgeClusterInput
}

type CreateEdgeClusterPayloadResolverContract

type CreateEdgeClusterPayloadResolverContract interface {
	// EdgeCluster returns the new edge cluster inforamtion
	// ctx: Mandatory. Reference to the context
	// Returns the new edge cluster inforamtion
	EdgeCluster(ctx context.Context) (EdgeClusterTypeEdgeResolverContract, error)

	// ClientMutationId returns the client mutation ID that was provided as part of the mutation request
	// ctx: Mandatory. Reference to the context
	// Returns the provided clientMutationId as part of mutation request
	ClientMutationId(ctx context.Context) *string
}

CreateEdgeClusterPayloadResolverContract declares the resolver that can return the payload contains the result of creating a new edge cluster

type DeleteEdgeClusterContract

type DeleteEdgeClusterContract interface {
	// MutateAndGetPayload update an existing edge cluster and returns the payload contains the result of deleting an existing edge cluster
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the input argument contains edge cluster information to update
	// Returns the deleted edge cluster payload or error if something goes wrong
	MutateAndGetPayload(
		ctx context.Context,
		args DeleteEdgeClusterInputArgument) (DeleteEdgeClusterPayloadResolverContract, error)
}

DeleteEdgeClusterContract declares the type to use when updating an existing edge cluster

type DeleteEdgeClusterInput

type DeleteEdgeClusterInput struct {
	EdgeClusterID    graphql.ID
	ClientMutationId *string
}

type DeleteEdgeClusterInputArgument

type DeleteEdgeClusterInputArgument struct {
	Input DeleteEdgeClusterInput
}

type DeleteEdgeClusterPayloadResolverContract

type DeleteEdgeClusterPayloadResolverContract interface {
	// DeletedEdgeClusterID returns the unique identifier of the edge cluster that got deleted
	// ctx: Mandatory. Reference to the context
	// Returns the unique identifier of the the edge cluster that got deleted
	DeletedEdgeClusterID(ctx context.Context) graphql.ID

	// ClientMutationId returns the client mutation ID that was provided as part of the mutation request
	// ctx: Mandatory. Reference to the context
	// Returns the provided clientMutationId as part of mutation request
	ClientMutationId(ctx context.Context) *string
}

DeleteEdgeClusterPayloadResolverContract declares the resolver that can return the payload contains the result of deleting an existing edge cluster

type EdgeClusterClientContract

type EdgeClusterClientContract interface {
	// CreateClient creats a new edge cluster gRPC client and returns the connection
	// and the client to the caller.
	// Returns connection and the edge cluster gRPC client or error if something goes wrong.
	CreateClient() (*grpc.ClientConn, edgeClusterGrpcContract.ServiceClient, error)
}

EdgeClusterClientContract wraps the edge cluser gRPC client to make it easy for testing

type EdgeClusterClusterEdgeClusterInputArgument

type EdgeClusterClusterEdgeClusterInputArgument struct {
	EdgeClusterID graphql.ID
}

type EdgeClusterDetail

type EdgeClusterDetail struct {
	EdgeCluster      *edgeclusterGrpcContract.EdgeCluster
	ProvisionDetails *edgeclusterGrpcContract.ProvisionDetail
}

type EdgeClusterEdgeClustersInputArgument

type EdgeClusterEdgeClustersInputArgument struct {
	relay.ConnectionArgument
	EdgeClusterIDs *[]graphql.ID
	SortOption     *string
}

type EdgeClusterNodeResolverCreatorContract added in v0.6.1

type EdgeClusterNodeResolverCreatorContract interface {
	// NewNodeConditionResolver creates new instance of the NodeConditionResolverContractContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// condition: Mandatory. Contains condition information for a node.
	// Returns the new instance or error if something goes wrong
	NewNodeConditionResolver(
		ctx context.Context,
		condition *edgeclusterGrpcContract.NodeCondition) (NodeConditionResolverContract, error)

	// NewNodeAddressResolver creates new instance of the NodeAddressResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// nodeAddresss: Mandatory. Contains information for the edge cluster node's address.
	// Returns the new instance or error if something goes wrong
	NewNodeAddressResolver(
		ctx context.Context,
		nodeAddresss *edgeclusterGrpcContract.EdgeClusterNodeAddress) (NodeAddressResolverContract, error)

	// NewNodeSystemInfoResolver creates new instance of the NodeSystemInfoResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// nodeInfo: Mandatory. Contains a set of ids/uuids to uniquely identify the node.
	// Returns the new instance or error if something goes wrong
	NewNodeSystemInfoResolver(
		ctx context.Context,
		nodeInfo *edgeclusterGrpcContract.NodeSystemInfo) (NodeSystemInfoResolverContract, error)

	// NewNodeStatusResolver creates new instance of the NodeStatusResolverContractContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// status: Mandatory. Contains information about the edge cluster node status
	// Returns the new instance or error if something goes wrong
	NewNodeStatusResolver(
		ctx context.Context,
		status *edgeclusterGrpcContract.NodeStatus) (NodeStatusResolverContract, error)

	// NewEdgeClusterNodeResolver creates new instance of the NodeResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// node: Mandatory. Contains information about the edge cluster node
	// Returns the new instance or error if something goes wrong
	NewEdgeClusterNodeResolver(
		ctx context.Context,
		node *edgeclusterGrpcContract.EdgeClusterNode) (NodeResolverContract, error)
}

type EdgeClusterPodInputArgument added in v0.6.1

type EdgeClusterPodInputArgument struct {
	NodeName  *string
	Namespace *string
}

type EdgeClusterPodResolverCreatorContract added in v0.6.1

type EdgeClusterPodResolverCreatorContract interface {
	// NewEdgeClusterPodResolver creates new instance of the PodResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// pod: Mandatory. Contains information about the edge cluster pod
	// Returns the new instance or error if something goes wrong
	NewEdgeClusterPodResolver(
		ctx context.Context,
		pod *edgeclusterGrpcContract.EdgeClusterPod) (PodResolverContract, error)

	// NewPodStatusResolver creates new instance of the PodStatusResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// status: Mandatory. Contains information about the edge cluster pod status
	// Returns the new instance or error if something goes wrong
	NewPodStatusResolver(
		ctx context.Context,
		status *edgeclusterGrpcContract.PodStatus) (PodStatusResolverContract, error)

	// NewPodSpecResolver creates new instance of the PodSpecResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// spec: Mandatory. Contains information about the edge cluster pod specification
	// Returns the new instance or error if something goes wrong
	NewPodSpecResolver(
		ctx context.Context,
		spec *edgeclusterGrpcContract.PodSpec) (PodSpecResolverContract, error)

	// NewPodConditionResolver creates new instance of the PodConditionResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// podCondition: Mandatory. Contains condition information for a pod.
	// Returns the new instance or error if something goes wrong
	NewPodConditionResolver(
		ctx context.Context,
		podCondition *edgeclusterGrpcContract.PodCondition) (PodConditionResolverContract, error)
}

type EdgeClusterProjectResolverContract added in v0.5.0

type EdgeClusterProjectResolverContract interface {
	// ID returns project unique identifier
	// ctx: Mandatory. Reference to the context
	// Returns the project  unique identifier
	ID(ctx context.Context) graphql.ID

	// Name returns project name
	// ctx: Mandatory. Reference to the context
	// Returns the project name
	Name(ctx context.Context) string
}

EdgeClusterProjectResolverContract declares the resolver that returns edge cluster project

type EdgeClusterResolverContract

type EdgeClusterResolverContract interface {
	// ID returns edge cluster unique identifier
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster unique identifier
	ID(ctx context.Context) graphql.ID

	// Name returns edge cluster name
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster name
	Name(ctx context.Context) string

	// ClusterSecret returns edge cluster secret
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster secret
	ClusterSecret(ctx context.Context) string

	// ClusterType returns the edge cluster current type
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster current type or error if something went wrong
	ClusterType(ctx context.Context) (string, error)

	// Project returns edge cluster project
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster project resolver or error if something goes wrong.
	Project(ctx context.Context) (EdgeClusterProjectResolverContract, error)

	// ProvisionDetails returns edge cluster provisioning detail
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster provisioning detail resolver or error if something goes wrong.
	ProvisionDetails(ctx context.Context) (ProvisionDetailsResolverContract, error)

	// Nodes returns the resolver that resolves the nodes that are part of the given edge cluster or error if something goes wrong.
	// ctx: Mandatory. Reference to the context
	// Returns the resolver that resolves the nodes that are part of the given edge cluster or error if something goes wrong.
	Nodes(ctx context.Context) ([]NodeResolverContract, error)

	// Pods returns the resolver that resolves the pods that are part of the given edge cluster or error if something goes wrong.
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the query argument
	// Returns the resolver that resolves the pods that are part of the given edge cluster or error if something goes wrong.
	Pods(ctx context.Context, args EdgeClusterPodInputArgument) ([]PodResolverContract, error)

	// Services returns the resolver that resolves the services that are part of the given edge cluster or error if something goes wrong.
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the query argument
	// Returns the resolver that resolves the services that are part of the given edge cluster or error if something goes wrong.
	Services(ctx context.Context, args EdgeClusterServiceInputArgument) ([]ServiceResolverContract, error)
}

EdgeClusterResolverContract declares the resolver that can retrieve edge cluster information

type EdgeClusterResolverCreatorContract added in v0.6.1

type EdgeClusterResolverCreatorContract interface {
	// NewEdgeClusterResolver creates new EdgeClusterResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// edgeClusterDetail: Optional. The edge cluster details, if provided, the value be used instead of contacting  the edge cluster service
	// Returns the EdgeClusterResolverContract or error if something goes wrong
	NewEdgeClusterResolver(
		ctx context.Context,
		edgeClusterID string,
		edgeClusterDetail *EdgeClusterDetail) (EdgeClusterResolverContract, error)

	// NewEdgeClusterTypeConnectionResolver creates new EdgeClusterTypeConnectionResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// edgeClusters: Mandatory. Reference the list of edge clusters
	// hasPreviousPage: Mandatory. Indicates whether more edges exist prior to the set defined by the clients arguments
	// hasNextPage: Mandatory. Indicates whether more edges exist following the set defined by the clients arguments
	// totalCount: Mandatory. The total count of matched edge clusters
	// Returns the EdgeClusterTypeConnectionResolverContract or error if something goes wrong
	NewEdgeClusterTypeConnectionResolver(
		ctx context.Context,
		edgeClusters []*edgeclusterGrpcContract.EdgeClusterWithCursor,
		hasPreviousPage bool,
		hasNextPage bool,
		totalCount int32) (EdgeClusterTypeConnectionResolverContract, error)

	// NewEdgeClusterTypeEdgeResolver creates new EdgeClusterTypeEdgeResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// cursor: Mandatory. The cursor
	// edgeClusterDetail: Optional. The edge cluster details, if provided, the value be used instead of contacting  the edge cluster service
	// Returns the EdgeClusterTypeEdgeResolverContract or error if something goes wrong
	NewEdgeClusterTypeEdgeResolver(
		ctx context.Context,
		edgeClusterID string,
		cursor string,
		edgeClusterDetail *EdgeClusterDetail) (EdgeClusterTypeEdgeResolverContract, error)

	// NewEdgeClusterProjectResolver creates new EdgeClusterTenatnResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// projectID: Mandatory. The project unique identifier
	// Returns the EdgeClusterTenatnResolverContract or error if something goes wrong
	NewEdgeClusterProjectResolver(
		ctx context.Context,
		projectID string) (EdgeClusterProjectResolverContract, error)

	// NewProvisionDetailsResolver creates new ProvisionDetailsResolverContract and returns it
	// ctx: Mandatory. Reference to the context
	// provisionDetails: Optional. The edge cluster provisioning details
	// Returns the ProvisionDetailsResolverContract or error if something goes wrong
	NewProvisionDetailsResolver(
		ctx context.Context,
		provisionDetails *edgeclusterGrpcContract.ProvisionDetail) (ProvisionDetailsResolverContract, error)
}

type EdgeClusterServiceInputArgument added in v0.6.1

type EdgeClusterServiceInputArgument struct {
	Namespace *string
}

type EdgeClusterServiceResolverCreatorContract added in v0.6.1

type EdgeClusterServiceResolverCreatorContract interface {
	// NewEdgeClusterServiceResolver creates new instance of the ServiceResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// service: Mandatory. Contains information about the edge cluster service
	// Returns the new instance or error if something goes wrong
	NewEdgeClusterServiceResolver(
		ctx context.Context,
		service *edgeclusterGrpcContract.EdgeClusterService) (ServiceResolverContract, error)

	// NewServiceStatusResolver creates new instance of the ServiceStatusResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// serviceStatus: Mandatory. Contains information about the service status
	// Returns the new instance or error if something goes wrong
	NewServiceStatusResolver(
		ctx context.Context,
		serviceStatus *edgeclusterGrpcContract.ServiceStatus) (ServiceStatusResolverContract, error)

	// NewServicePortResolver creates new instance of the ServicePortResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// servicePort: Mandatory. Contains information about the service port
	// Returns the new instance or error if something goes wrong
	NewServicePortResolver(
		ctx context.Context,
		servicePort *edgeclusterGrpcContract.ServicePort) (ServicePortResolverContract, error)
}

type EdgeClusterTypeConnectionResolverContract

type EdgeClusterTypeConnectionResolverContract interface {
	// PageInfo returns the paging information compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// Returns the paging information resolver or error if something goes wrong.
	PageInfo(ctx context.Context) (relay.PageInfoResolverContract, error)

	// Edges returns the edge cluster edges compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster edges resolver or error if something goes wrong.
	Edges(ctx context.Context) (*[]EdgeClusterTypeEdgeResolverContract, error)

	// TotalCount returns total count of the matched edge clusters
	// ctx: Mandatory. Reference to the context
	// Returns the total count of the matched edge cluster
	TotalCount(ctx context.Context) *int32
}

EdgeClusterTypeConnectionResolverContract declares the resolver that returns edge cluster edge compatible with graphql-relay

type EdgeClusterTypeEdgeResolverContract

type EdgeClusterTypeEdgeResolverContract interface {
	// Node returns the edge cluster resolver
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster resolver or error if something goes wrong
	Node(ctx context.Context) (EdgeClusterResolverContract, error)

	// Cursor returns the cursor for the edge cluster edge compatible with graphql-relay
	// ctx: Mandatory. Reference to the context
	// Returns the cursor
	Cursor(ctx context.Context) string
}

EdgeClusterTypeEdgeResolverContract declares the resolver that returns edge cluster edge compatible with graphql-relay

type LoadBalancerIngressResolverContract added in v0.6.1

type LoadBalancerIngressResolverContract interface {
	// IP is set for load-balancer ingress points that are IP based
	// ctx: Mandatory. Reference to the context
	// Returns the IP that is set for load-balancer ingress points that are IP based
	IP(ctx context.Context) string

	// Hostname is set for load-balancer ingress points that are DNS based
	// ctx: Mandatory. Reference to the context
	// Returns the hostname that is set for load-balancer ingress points that are DNS based
	Hostname(ctx context.Context) string

	// PortStatus is a list of records of service ports
	// If used, every port defined in the service should have an entry in it
	// ctx: Mandatory. Reference to the context
	// Returns an array of port status resolver or error if something goes wrong.
	PortStatus(ctx context.Context) ([]PortStatusResolverContract, error)
}

LoadBalancerIngressResolverContract represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.

type LoadBalancerStatusResolverContract added in v0.6.1

type LoadBalancerStatusResolverContract interface {
	// Ingress is a list containing ingress points for the load-balancer.
	// Traffic intended for the service should be sent to these ingress points.
	// ctx: Mandatory. Reference to the context
	// Returns an array of load balancer ingress resolver or error if something goes wrong.
	Ingress(ctx context.Context) ([]LoadBalancerIngressResolverContract, error)
}

LoadBalancerStatusResolverContract represents the status of a load-balancer.

type MutationResolverCreatorContract

type MutationResolverCreatorContract interface {
	// NewCreateEdgeCluster creates new instance of the CreateEdgeClusterContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewCreateEdgeCluster(ctx context.Context) (CreateEdgeClusterContract, error)

	// NewCreateEdgeClusterPayloadResolver creates new instance of the CreateEdgeClusterPayloadResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// edgeClusterDetail: Mandatory. The edge cluster details
	// cursor: Mandatory. The edge cluster cursor
	// Returns the new instance or error if something goes wrong
	NewCreateEdgeClusterPayloadResolver(
		ctx context.Context,
		clientMutationId *string,
		edgeClusterID string,
		edgeClusterDetail *EdgeClusterDetail,
		cursor string) (CreateEdgeClusterPayloadResolverContract, error)

	// NewUpdateEdgeCluster creates new instance of the UpdateEdgeClusterContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewUpdateEdgeCluster(ctx context.Context) (UpdateEdgeClusterContract, error)

	// NewUpdateEdgeClusterPayloadResolver creates new instance of the UpdateEdgeClusterPayloadResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// edgeClusterDetail: Mandatory. The edge cluster details
	// cursor: Mandatory. The edge cluster cursor
	// Returns the new instance or error if something goes wrong
	NewUpdateEdgeClusterPayloadResolver(
		ctx context.Context,
		clientMutationId *string,
		edgeClusterID string,
		edgeClusterDetail *EdgeClusterDetail,
		cursor string) (UpdateEdgeClusterPayloadResolverContract, error)

	// NewDeleteEdgeCluster creates new instance of the DeleteEdgeClusterContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// Returns the new instance or error if something goes wrong
	NewDeleteEdgeCluster(ctx context.Context) (DeleteEdgeClusterContract, error)

	// NewDeleteEdgeClusterPayloadResolver creates new instance of the DeleteEdgeClusterPayloadResolverContract, setting up all dependencies and returns the instance
	// ctx: Mandatory. Reference to the context
	// edgeClusterID: Mandatory. The edge cluster unique identifier
	// clientMutationId: Optional. Reference to the client mutation ID to correlate the request and response
	// Returns the new instance or error if something goes wrong
	NewDeleteEdgeClusterPayloadResolver(
		ctx context.Context,
		edgeClusterID string,
		clientMutationId *string) (DeleteEdgeClusterPayloadResolverContract, error)
}

type NodeAddressResolverContract added in v0.6.1

type NodeAddressResolverContract interface {
	// Type returns the edge cluster node address type, one of Hostname, ExternalIP or InternalIP.
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster node address type, one of Hostname, ExternalIP or InternalIP.
	NodeAddressType(ctx context.Context) string

	// Address returns the node address.
	// ctx: Mandatory. Reference to the context
	// Returns the node address.
	Address(ctx context.Context) string
}

NodeAddressResolverContract declares the resolver that contains information for the edge cluster node's address.

type NodeConditionResolverContract added in v0.6.1

type NodeConditionResolverContract interface {
	// Type returns the type of node condition.
	// ctx: Mandatory. Reference to the context
	// Returns the type of node condition.
	Type(ctx context.Context) string

	// Status returns the status of the condition, one of True, False, Unknown.
	// ctx: Mandatory. Reference to the context
	// Returns the status of the condition, one of True, False, Unknown.
	Status(ctx context.Context) string

	// LastHeartbeatTime returns the last time we got an update on a given condition.
	// ctx: Mandatory. Reference to the context
	// Returns the last time we got an update on a given condition.
	LastHeartbeatTime(ctx context.Context) string

	// LastTransitionTime returns the last time the condition transit from one status to another.
	// ctx: Mandatory. Reference to the context
	// Returns the last time the condition transit from one status to another.
	LastTransitionTime(ctx context.Context) string

	// Reason returns the (brief) reason for the condition's last transition.
	// ctx: Mandatory. Reference to the context
	// Returns the (brief) reason for the condition's last transition.
	Reason(ctx context.Context) string

	// Message returns the human readable message indicating details about last transition.
	// ctx: Mandatory. Reference to the context
	// Returns the human readable message indicating details about last transition.
	Message(ctx context.Context) string
}

NodeConditionResolverContract declares the resolver that returns the current service state of node

type NodeResolverContract added in v0.6.1

type NodeResolverContract interface {
	// Metadata contains the node metadata
	// ctx: Mandatory. Reference to the context
	// Returns the node metadata resolver or error if something goes wrong.
	Metadata(ctx context.Context) (ObjectMetaResolverContract, error)

	// Status contains the most recently observed status of the node
	// ctx: Mandatory. Reference to the context
	// Returns the most recently observed status of the node resolver or error if something goes wrong.
	Status(ctx context.Context) (NodeStatusResolverContract, error)
}

NodeResolverContract declares the resolver that contains information about the edge cluster node.

type NodeStatusResolverContract added in v0.6.1

type NodeStatusResolverContract interface {
	// Conditions is an array of current observed node conditions.
	// ctx: Mandatory. Reference to the context
	// Returns an array of current observed node conditions resolver or error if something goes wrong.
	Conditions(ctx context.Context) ([]NodeConditionResolverContract, error)

	// Addresses is the list of addresses reachable to the node.
	// ctx: Mandatory. Reference to the context
	// Returns the list of addresses reachable to the node resolver or error if something goes wrong.
	Addresses(ctx context.Context) ([]NodeAddressResolverContract, error)

	// NodeInfo is the set of ids/uuids to uniquely identify the node.
	// ctx: Mandatory. Reference to the context
	// Returns the set of ids/uuids to uniquely identify the node resolver or error if something goes wrong.
	NodeInfo(ctx context.Context) (NodeSystemInfoResolverContract, error)
}

NodeStatusResolverContract declares the resolver that contains information about the status of a node.

type NodeSystemInfoResolverContract added in v0.6.1

type NodeSystemInfoResolverContract interface {
	// MachineID reported by the node. For unique machine identification in the cluster this field is preferred.
	// ctx: Mandatory. Reference to the context
	// Returns the MachineID reported by the node. For unique machine identification in the cluster this field is preferred.
	MachineID(ctx context.Context) string

	// SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts
	// ctx: Mandatory. Reference to the context
	// Returns the SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts
	SystemUUID(ctx context.Context) string

	// BootID reported by the node.
	// ctx: Mandatory. Reference to the context
	// Returns the Boot ID reported by the node.
	BootID(ctx context.Context) string

	// KernelVersion reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
	// ctx: Mandatory. Reference to the context
	// Returns the Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).
	KernelVersion(ctx context.Context) string

	// OSImage reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
	// ctx: Mandatory. Reference to the context
	// Returns the OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).
	OSImage(ctx context.Context) string

	// ContainerRuntimeVersion reported by the node through runtime remote API (e.g. docker://1.5.0).
	// ctx: Mandatory. Reference to the context
	// Returns the ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).
	ContainerRuntimeVersion(ctx context.Context) string

	// KubeletVersion reported by the node.
	// ctx: Mandatory. Reference to the context
	// Returns the Kubelet Version reported by the node.
	KubeletVersion(ctx context.Context) string

	// KubeProxyVersion reported by the node.
	// ctx: Mandatory. Reference to the context
	// Returns the KubeProxy Version reported by the node.
	KubeProxyVersion(ctx context.Context) string

	// OperatingSystem System reported by the node
	// ctx: Mandatory. Reference to the context
	// Returns the Operating System reported by the node
	OperatingSystem(ctx context.Context) string

	// The Architecture reported by the node
	// ctx: Mandatory. Reference to the context
	// Returns the Architecture reported by the node
	Architecture(ctx context.Context) string
}

NodeSystemInfoResolverContract declares the resolver that contains a set of ids/uuids to uniquely identify the node.

type ObjectMetaResolverContract added in v0.6.1

type ObjectMetaResolverContract interface {
	// ID returns the object unique identitfier
	// ctx: Mandatory. Reference to the context
	// Returns the object unique identitfier
	ID(ctx context.Context) graphql.ID

	// Name returns the object name
	// ctx: Mandatory. Reference to the context
	// Returns the object name
	Name(ctx context.Context) string

	// Namespace returns the object namespace
	// ctx: Mandatory. Reference to the context
	// Returns the object namespace
	Namespace(ctx context.Context) string
}

ObjectMetaResolverContract declares the standard edge cluster object's metadata.

type PodConditionResolverContract added in v0.6.1

type PodConditionResolverContract interface {
	// Type is the type of the condition
	// ctx: Mandatory. Reference to the context
	// Returns the type of the condition
	Type(ctx context.Context) string

	// Status returns the status of the condition
	// ctx: Mandatory. Reference to the context
	// Returns the status of the condition
	Status(ctx context.Context) string

	// LastHeartbeatTime returns the last time we got an update on a given condition
	// ctx: Mandatory. Reference to the context
	// Returns the last time we got an update on a given condition
	LastProbeTime(ctx context.Context) string

	// LastTransitionTime returns the last time the condition transitioned from one status to another
	// ctx: Mandatory. Reference to the context
	// Returns the last time the condition transitioned from one status to another
	LastTransitionTime(ctx context.Context) string

	// Reason returns the Unique, one-word, CamelCase reason for the condition's last transition
	// ctx: Mandatory. Reference to the context
	// Returns the Unique, one-word, CamelCase reason for the condition's last transition
	Reason(ctx context.Context) string

	// Message returns the human-readable message indicating details about last transition
	// ctx: Mandatory. Reference to the context
	// Returns the human-readable message indicating details about last transition
	Message(ctx context.Context) string
}

PodConditionResolverContract declares the resolver that returns the current service state of pod

type PodResolverContract added in v0.6.1

type PodResolverContract interface {
	// Metadata contains the pod metadata
	// ctx: Mandatory. Reference to the context
	// Returns the pod metadata resolver or error if something goes wrong.
	Metadata(ctx context.Context) (ObjectMetaResolverContract, error)

	// Status contains the most recently observed status of the pod
	// ctx: Mandatory. Reference to the context
	// Returns the most recently observed status of the pod resolver or error if something goes wrong.
	Status(ctx context.Context) (PodStatusResolverContract, error)

	// Status contains the specification of the desired behavior of the pod
	// ctx: Mandatory. Reference to the context
	// Returns the specification of the desired behavior of the pod resolver or error if something goes wrong.
	Spec(ctx context.Context) (PodSpecResolverContract, error)
}

PodResolverContract declares the resolver that contains information about the edge cluster pod

type PodSpecResolverContract added in v0.6.1

type PodSpecResolverContract interface {
	// NodeName returns the name of the node where the Pod is deployed into.
	// ctx: Mandatory. Reference to the context
	// Returns the name of the node where the Pod is deployed into.
	NodeName(ctx context.Context) string
}

PodSpecResolverContract declares the resolver that contains the specification of the desired behavior of the existing edge cluster pod

type PodStatusResolverContract added in v0.6.1

type PodStatusResolverContract interface {
	// HostIP returns the IP address allocated to the pod. Routable at least within the cluster.
	// ctx: Mandatory. Reference to the context
	// Returns the IP address allocated to the pod. Routable at least within the cluster.
	HostIP(ctx context.Context) string

	// PodIP returns the IP address allocated to the pod. Routable at least within the cluster.
	// ctx: Mandatory. Reference to the context
	// Returns the IP address allocated to the pod. Routable at least within the cluster.
	PodIP(ctx context.Context) string

	// Conditions is an array of current observed node conditions.
	// ctx: Mandatory. Reference to the context
	// Returns an array of current observed node conditions resolver or error if something goes wrong.
	Conditions(ctx context.Context) ([]PodConditionResolverContract, error)
}

PodStatusResolverContract declares the resolver that contains the most recently observed status of the existing edge cluster pod

type PortStatusResolverContract added in v0.6.1

type PortStatusResolverContract interface {
	// Port is the port number of the service port of which status is recorded here
	// ctx: Mandatory. Reference to the context
	// Returns the port number of the service port of which status is recorded here
	Port(ctx context.Context) int32

	// Protocol is the protocol of the service port of which status is recorded here
	// ctx: Mandatory. Reference to the context
	// Returns the protocol of the service port of which status is recorded here
	Protocol(ctx context.Context) string

	// Error is to record the problem with the service port
	// ctx: Mandatory. Reference to the context
	// Returns the problem with the service port
	Error(ctx context.Context) *string
}

PortStatusResolverContract represents the error condition of a service port

type ProvisionDetailsResolverContract added in v0.6.1

type ProvisionDetailsResolverContract interface {
	// LoadBalancer contains the current status of the load-balancer
	// ctx: Mandatory. Reference to the context
	// Returns the load balancer status resolver or error if something goes wrong.
	LoadBalancer(ctx context.Context) (LoadBalancerStatusResolverContract, error)

	// KubeconfigContent returns the edge cluster Kubeconfig content
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster Kubeconfig content
	KubeconfigContent(ctx context.Context) *string

	// Ports returns the ports that are exposed by the service
	// ctx: Mandatory. Reference to the context
	// Returns the ports that are exposed by the service
	Ports(ctx context.Context) []int32
}

ProvisionDetailsResolverContract declares the resolver that returns edge cluster provisioning details

type RootResolverContract

type RootResolverContract interface {
	// CreateEdgeCluster returns create edge cluster mutator
	// ctx: Mandatory. Reference to the context
	// Returns the create edge cluster mutator or error if something goes wrong
	CreateEdgeCluster(
		ctx context.Context,
		args CreateEdgeClusterInputArgument) (CreateEdgeClusterPayloadResolverContract, error)

	// UpdateEdgeCluster returns update edge cluster mutator
	// ctx: Mandatory. Reference to the context
	// Returns the update edge cluster mutator or error if something goes wrong
	UpdateEdgeCluster(
		ctx context.Context,
		args UpdateEdgeClusterInputArgument) (UpdateEdgeClusterPayloadResolverContract, error)

	// DeleteEdgeCluster returns delete edge cluster mutator
	// ctx: Mandatory. Reference to the context
	// Returns the delete edge cluster mutator or error if something goes wrong
	DeleteEdgeCluster(
		ctx context.Context,
		args DeleteEdgeClusterInputArgument) (DeleteEdgeClusterPayloadResolverContract, error)
}

RootResolverContract declares the root resolver

type ServiceConditionResolverContract added in v0.6.1

type ServiceConditionResolverContract interface {
	// Type is the type of the condition
	// ctx: Mandatory. Reference to the context
	// Returns the type of the condition
	Type(ctx context.Context) string

	// Status returns the status of the condition
	// ctx: Mandatory. Reference to the context
	// Returns the status of the condition
	Status(ctx context.Context) string

	// LastTransitionTime returns the last time the condition transitioned from one status to another
	// ctx: Mandatory. Reference to the context
	// Returns the last time the condition transitioned from one status to another
	LastTransitionTime(ctx context.Context) string

	// Reason returns the Unique, one-word, CamelCase reason for the condition's last transition
	// ctx: Mandatory. Reference to the context
	// Returns the Unique, one-word, CamelCase reason for the condition's last transition
	Reason(ctx context.Context) string

	// Message returns the human-readable message indicating details about last transition
	// ctx: Mandatory. Reference to the context
	// Returns the human-readable message indicating details about last transition
	Message(ctx context.Context) string
}

ServiceConditionResolverContract declares the resolver that returns the current service state of service

type ServicePortResolverContract added in v0.6.1

type ServicePortResolverContract interface {
	// Type is the name of this port within the service
	// ctx: Mandatory. Reference to the context
	// Returns he name of this port within the service
	Name(ctx context.Context) string

	// Protocol is the IP protocol for this port
	// ctx: Mandatory. Reference to the context
	// Returns the IP protocol for this port
	Protocol(ctx context.Context) string

	// Port is the port that will be exposed by this service
	// ctx: Mandatory. Reference to the context
	// Returns the port that will be exposed by this service
	Port(ctx context.Context) int32

	// TargetPort is the number or name of the port to access on the pods targeted by the service
	// ctx: Mandatory. Reference to the context
	// Returns the number or name of the port to access on the pods targeted by the service
	TargetPort(ctx context.Context) string

	// NodePort is the port on each node on which this service is exposed when type is
	// NodePort or LoadBalancer
	// ctx: Mandatory. Reference to the context
	// Returns the port on each node on which this service is exposed
	NodePort(ctx context.Context) int32
}

ServicePortResolverContract declares the resolver that contains information on service's port.

type ServiceResolverContract added in v0.6.1

type ServiceResolverContract interface {
	// Metadata contains the service metadata
	// ctx: Mandatory. Reference to the context
	// Returns the service metadata resolver or error if something goes wrong.
	Metadata(ctx context.Context) (ObjectMetaResolverContract, error)

	// Status contains the most recently observed status of the service
	// ctx: Mandatory. Reference to the context
	// Returns the most recently observed status of the service resolver or error if something goes wrong.
	Status(ctx context.Context) (ServiceStatusResolverContract, error)

	// Status contains the specification of the desired behavior of the service
	// ctx: Mandatory. Reference to the context
	// Returns the specification of the desired behavior of the service resolver or error if something goes wrong.
	Spec(ctx context.Context) (ServiceSpecResolverContract, error)
}

ServiceResolverContract declares the resolver that contains information about the edge cluster service

type ServiceSpecResolverContract added in v0.6.1

type ServiceSpecResolverContract interface {
	// Ports is the list of ports that are exposed by this service
	// ctx: Mandatory. Reference to the context
	// Returns an array of service port resolver or error if something goes wrong.
	Ports(ctx context.Context) ([]ServicePortResolverContract, error)

	// ClusterIPs is a list of IP addresses assigned to this service
	// ctx: Mandatory. Reference to the context
	// Returns the list of IP addresses assigned to this service
	ClusterIPs(ctx context.Context) []string

	// Type determines how the Service is exposed
	// ctx: Mandatory. Reference to the context
	// Returns how the service is exposed
	Type(ctx context.Context) string

	// ExternalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service
	// ctx: Mandatory. Reference to the context
	// Returns the list of IP addresses for which nodes in the cluster will also accept traffic for this service
	ExternalIPs(ctx context.Context) []string

	// ExternalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record)
	// ctx: Mandatory. Reference to the context
	// Returns the the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record)
	ExternalName(ctx context.Context) *string
}

ServiceSpecResolverContract declares the resolver that returns the the specification of the desired behavior of the existing edge cluster service

type ServiceStatusResolverContract added in v0.6.1

type ServiceStatusResolverContract interface {
	// LoadBalancer contains the current status of the load-balancer
	// ctx: Mandatory. Reference to the context
	// Returns the load balancer status resolver or error if something goes wrong.
	LoadBalancer(ctx context.Context) (LoadBalancerStatusResolverContract, error)

	// KubeconfigContent returns the edge cluster Kubeconfig content
	// ctx: Mandatory. Reference to the context
	// Returns the edge cluster Kubeconfig content
	Conditions(ctx context.Context) ([]ServiceConditionResolverContract, error)
}

ServiceStatusResolverContract declares the resolver that returns the most recently observed status of the existing edge cluster service

type UpdateEdgeClusterContract

type UpdateEdgeClusterContract interface {
	// MutateAndGetPayload update an existing edge cluster and returns the payload contains the result of updating an existing edge cluster
	// ctx: Mandatory. Reference to the context
	// args: Mandatory. Reference to the input argument contains edge cluster information to update
	// Returns the updated edge cluster payload or error if something goes wrong
	MutateAndGetPayload(
		ctx context.Context,
		args UpdateEdgeClusterInputArgument) (UpdateEdgeClusterPayloadResolverContract, error)
}

UpdateEdgeClusterContract declares the type to use when updating an existing edge cluster

type UpdateEdgeClusterInput

type UpdateEdgeClusterInput struct {
	EdgeClusterID    graphql.ID
	ProjectID        graphql.ID
	Name             string
	ClusterSecret    string
	ClusterType      string
	ClientMutationId *string
}

type UpdateEdgeClusterInputArgument

type UpdateEdgeClusterInputArgument struct {
	Input UpdateEdgeClusterInput
}

type UpdateEdgeClusterPayloadResolverContract

type UpdateEdgeClusterPayloadResolverContract interface {
	// EdgeCluster returns the updated edge cluster inforamtion
	// ctx: Mandatory. Reference to the context
	// Returns the updated edge cluster inforamtion
	EdgeCluster(ctx context.Context) (EdgeClusterTypeEdgeResolverContract, error)

	// ClientMutationId returns the client mutation ID that was provided as part of the mutation request
	// ctx: Mandatory. Reference to the context
	// Returns the provided clientMutationId as part of mutation request
	ClientMutationId(ctx context.Context) *string
}

UpdateEdgeClusterPayloadResolverContract declares the resolver that can return the payload contains the result of updating an existing edge cluster

Jump to

Keyboard shortcuts

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