1
0
mirror of https://github.com/rancher/types.git synced 2025-06-28 06:26:49 +00:00

Merge pull request #602 from ibuildthecloud/master

Update generated code
This commit is contained in:
Darren Shepherd 2018-10-24 08:45:06 -07:00 committed by GitHub
commit c3e9ad5cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
953 changed files with 41219 additions and 46907 deletions

View File

@ -1,7 +1,7 @@
package v1beta2
import (
apps_v1beta2 "k8s.io/api/apps/v1beta2"
appsv1beta2 "k8s.io/api/apps/v1beta2"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]apps_v1beta2.DaemonSet, len(*in))
*out = make([]appsv1beta2.DaemonSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -45,7 +45,7 @@ func (in *DeploymentList) DeepCopyInto(out *DeploymentList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]apps_v1beta2.Deployment, len(*in))
*out = make([]appsv1beta2.Deployment, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -78,7 +78,7 @@ func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]apps_v1beta2.ReplicaSet, len(*in))
*out = make([]appsv1beta2.ReplicaSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -111,7 +111,7 @@ func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]apps_v1beta2.StatefulSet, len(*in))
*out = make([]appsv1beta2.StatefulSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -32,6 +34,19 @@ type Client struct {
replicaSetControllers map[string]ReplicaSetController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -1,7 +1,7 @@
package v1
import (
batch_v1 "k8s.io/api/batch/v1"
batchv1 "k8s.io/api/batch/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *JobList) DeepCopyInto(out *JobList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]batch_v1.Job, len(*in))
*out = make([]batchv1.Job, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -26,6 +28,19 @@ type Client struct {
jobControllers map[string]JobController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -1,7 +1,7 @@
package v1beta1
import (
batch_v1beta1 "k8s.io/api/batch/v1beta1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *CronJobList) DeepCopyInto(out *CronJobList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]batch_v1beta1.CronJob, len(*in))
*out = make([]batchv1beta1.CronJob, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -26,6 +28,19 @@ type Client struct {
cronJobControllers map[string]CronJobController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -1,7 +1,7 @@
package v1
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *ComponentStatusList) DeepCopyInto(out *ComponentStatusList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.ComponentStatus, len(*in))
*out = make([]corev1.ComponentStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -45,7 +45,7 @@ func (in *ConfigMapList) DeepCopyInto(out *ConfigMapList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.ConfigMap, len(*in))
*out = make([]corev1.ConfigMap, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -78,7 +78,7 @@ func (in *EndpointsList) DeepCopyInto(out *EndpointsList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Endpoints, len(*in))
*out = make([]corev1.Endpoints, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -111,7 +111,7 @@ func (in *EventList) DeepCopyInto(out *EventList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Event, len(*in))
*out = make([]corev1.Event, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -144,7 +144,7 @@ func (in *NamespaceList) DeepCopyInto(out *NamespaceList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Namespace, len(*in))
*out = make([]corev1.Namespace, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -177,7 +177,7 @@ func (in *NodeList) DeepCopyInto(out *NodeList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Node, len(*in))
*out = make([]corev1.Node, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -210,7 +210,7 @@ func (in *PersistentVolumeClaimList) DeepCopyInto(out *PersistentVolumeClaimList
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.PersistentVolumeClaim, len(*in))
*out = make([]corev1.PersistentVolumeClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -243,7 +243,7 @@ func (in *PodList) DeepCopyInto(out *PodList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Pod, len(*in))
*out = make([]corev1.Pod, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -276,7 +276,7 @@ func (in *ReplicationControllerList) DeepCopyInto(out *ReplicationControllerList
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.ReplicationController, len(*in))
*out = make([]corev1.ReplicationController, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -309,7 +309,7 @@ func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.ResourceQuota, len(*in))
*out = make([]corev1.ResourceQuota, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -342,7 +342,7 @@ func (in *SecretList) DeepCopyInto(out *SecretList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Secret, len(*in))
*out = make([]corev1.Secret, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -375,7 +375,7 @@ func (in *ServiceAccountList) DeepCopyInto(out *ServiceAccountList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.ServiceAccount, len(*in))
*out = make([]corev1.ServiceAccount, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -408,7 +408,7 @@ func (in *ServiceList) DeepCopyInto(out *ServiceList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]core_v1.Service, len(*in))
*out = make([]corev1.Service, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -50,6 +52,19 @@ type Client struct {
resourceQuotaControllers map[string]ResourceQuotaController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -1,7 +1,7 @@
package v1beta1
import (
extensions_v1beta1 "k8s.io/api/extensions/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *IngressList) DeepCopyInto(out *IngressList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]extensions_v1beta1.Ingress, len(*in))
*out = make([]extensionsv1beta1.Ingress, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -45,7 +45,7 @@ func (in *PodSecurityPolicyList) DeepCopyInto(out *PodSecurityPolicyList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]extensions_v1beta1.PodSecurityPolicy, len(*in))
*out = make([]extensionsv1beta1.PodSecurityPolicy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -28,6 +30,19 @@ type Client struct {
ingressControllers map[string]IngressController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -2,7 +2,7 @@ package v3
import (
v1 "k8s.io/api/core/v1"
rbac_v1 "k8s.io/api/rbac/v1"
rbacv1 "k8s.io/api/rbac/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
version "k8s.io/apimachinery/pkg/version"
)
@ -77,12 +77,8 @@ func (in *ActiveDirectoryConfig) DeepCopyInto(out *ActiveDirectoryConfig) {
}
if in.NestedGroupMembershipEnabled != nil {
in, out := &in.NestedGroupMembershipEnabled, &out.NestedGroupMembershipEnabled
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
return
}
@ -190,12 +186,8 @@ func (in *AmazonElasticContainerServiceConfig) DeepCopyInto(out *AmazonElasticCo
}
if in.AssociateWorkerNodePublicIP != nil {
in, out := &in.AssociateWorkerNodePublicIP, &out.AssociateWorkerNodePublicIP
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
return
}
@ -686,39 +678,23 @@ func (in *CloudProvider) DeepCopyInto(out *CloudProvider) {
*out = *in
if in.AWSCloudProvider != nil {
in, out := &in.AWSCloudProvider, &out.AWSCloudProvider
if *in == nil {
*out = nil
} else {
*out = new(AWSCloudProvider)
**out = **in
}
*out = new(AWSCloudProvider)
**out = **in
}
if in.AzureCloudProvider != nil {
in, out := &in.AzureCloudProvider, &out.AzureCloudProvider
if *in == nil {
*out = nil
} else {
*out = new(AzureCloudProvider)
**out = **in
}
*out = new(AzureCloudProvider)
**out = **in
}
if in.OpenstackCloudProvider != nil {
in, out := &in.OpenstackCloudProvider, &out.OpenstackCloudProvider
if *in == nil {
*out = nil
} else {
*out = new(OpenstackCloudProvider)
**out = **in
}
*out = new(OpenstackCloudProvider)
**out = **in
}
if in.VsphereCloudProvider != nil {
in, out := &in.VsphereCloudProvider, &out.VsphereCloudProvider
if *in == nil {
*out = nil
} else {
*out = new(VsphereCloudProvider)
(*in).DeepCopyInto(*out)
}
*out = new(VsphereCloudProvider)
(*in).DeepCopyInto(*out)
}
return
}
@ -829,30 +805,18 @@ func (in *ClusterAlertSpec) DeepCopyInto(out *ClusterAlertSpec) {
in.AlertCommonSpec.DeepCopyInto(&out.AlertCommonSpec)
if in.TargetNode != nil {
in, out := &in.TargetNode, &out.TargetNode
if *in == nil {
*out = nil
} else {
*out = new(TargetNode)
(*in).DeepCopyInto(*out)
}
*out = new(TargetNode)
(*in).DeepCopyInto(*out)
}
if in.TargetSystemService != nil {
in, out := &in.TargetSystemService, &out.TargetSystemService
if *in == nil {
*out = nil
} else {
*out = new(TargetSystemService)
**out = **in
}
*out = new(TargetSystemService)
**out = **in
}
if in.TargetEvent != nil {
in, out := &in.TargetEvent, &out.TargetEvent
if *in == nil {
*out = nil
} else {
*out = new(TargetEvent)
**out = **in
}
*out = new(TargetEvent)
**out = **in
}
return
}
@ -1145,12 +1109,8 @@ func (in *ClusterLoggingStatus) DeepCopyInto(out *ClusterLoggingStatus) {
in.AppliedSpec.DeepCopyInto(&out.AppliedSpec)
if in.FailedSpec != nil {
in, out := &in.FailedSpec, &out.FailedSpec
if *in == nil {
*out = nil
} else {
*out = new(ClusterLoggingSpec)
(*in).DeepCopyInto(*out)
}
*out = new(ClusterLoggingSpec)
(*in).DeepCopyInto(*out)
}
return
}
@ -1324,57 +1284,33 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
*out = *in
if in.ImportedConfig != nil {
in, out := &in.ImportedConfig, &out.ImportedConfig
if *in == nil {
*out = nil
} else {
*out = new(ImportedConfig)
**out = **in
}
*out = new(ImportedConfig)
**out = **in
}
if in.GoogleKubernetesEngineConfig != nil {
in, out := &in.GoogleKubernetesEngineConfig, &out.GoogleKubernetesEngineConfig
if *in == nil {
*out = nil
} else {
*out = new(GoogleKubernetesEngineConfig)
(*in).DeepCopyInto(*out)
}
*out = new(GoogleKubernetesEngineConfig)
(*in).DeepCopyInto(*out)
}
if in.AzureKubernetesServiceConfig != nil {
in, out := &in.AzureKubernetesServiceConfig, &out.AzureKubernetesServiceConfig
if *in == nil {
*out = nil
} else {
*out = new(AzureKubernetesServiceConfig)
(*in).DeepCopyInto(*out)
}
*out = new(AzureKubernetesServiceConfig)
(*in).DeepCopyInto(*out)
}
if in.RancherKubernetesEngineConfig != nil {
in, out := &in.RancherKubernetesEngineConfig, &out.RancherKubernetesEngineConfig
if *in == nil {
*out = nil
} else {
*out = new(RancherKubernetesEngineConfig)
(*in).DeepCopyInto(*out)
}
*out = new(RancherKubernetesEngineConfig)
(*in).DeepCopyInto(*out)
}
if in.AmazonElasticContainerServiceConfig != nil {
in, out := &in.AmazonElasticContainerServiceConfig, &out.AmazonElasticContainerServiceConfig
if *in == nil {
*out = nil
} else {
*out = new(AmazonElasticContainerServiceConfig)
(*in).DeepCopyInto(*out)
}
*out = new(AmazonElasticContainerServiceConfig)
(*in).DeepCopyInto(*out)
}
if in.EnableNetworkPolicy != nil {
in, out := &in.EnableNetworkPolicy, &out.EnableNetworkPolicy
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
return
}
@ -1421,12 +1357,8 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
in.AppliedSpec.DeepCopyInto(&out.AppliedSpec)
if in.FailedSpec != nil {
in, out := &in.FailedSpec, &out.FailedSpec
if *in == nil {
*out = nil
} else {
*out = new(ClusterSpec)
(*in).DeepCopyInto(*out)
}
*out = new(ClusterSpec)
(*in).DeepCopyInto(*out)
}
if in.Requested != nil {
in, out := &in.Requested, &out.Requested
@ -1444,12 +1376,8 @@ func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) {
}
if in.Version != nil {
in, out := &in.Version, &out.Version
if *in == nil {
*out = nil
} else {
*out = new(version.Info)
**out = **in
}
*out = new(version.Info)
**out = **in
}
in.Capabilities.DeepCopyInto(&out.Capabilities)
return
@ -2113,7 +2041,7 @@ func (in *GlobalRole) DeepCopyInto(out *GlobalRole) {
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]rbac_v1.PolicyRule, len(*in))
*out = make([]rbacv1.PolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -2259,30 +2187,18 @@ func (in *GoogleKubernetesEngineConfig) DeepCopyInto(out *GoogleKubernetesEngine
}
if in.EnableHTTPLoadBalancing != nil {
in, out := &in.EnableHTTPLoadBalancing, &out.EnableHTTPLoadBalancing
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
if in.EnableHorizontalPodAutoscaling != nil {
in, out := &in.EnableHorizontalPodAutoscaling, &out.EnableHorizontalPodAutoscaling
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
if in.EnableNetworkPolicyConfig != nil {
in, out := &in.EnableNetworkPolicyConfig, &out.EnableNetworkPolicyConfig
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
if in.Locations != nil {
in, out := &in.Locations, &out.Locations
@ -2291,21 +2207,13 @@ func (in *GoogleKubernetesEngineConfig) DeepCopyInto(out *GoogleKubernetesEngine
}
if in.EnableStackdriverLogging != nil {
in, out := &in.EnableStackdriverLogging, &out.EnableStackdriverLogging
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
if in.EnableStackdriverMonitoring != nil {
in, out := &in.EnableStackdriverMonitoring, &out.EnableStackdriverMonitoring
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
return
}
@ -2995,48 +2903,28 @@ func (in *LoggingCommonSpec) DeepCopyInto(out *LoggingCommonSpec) {
}
if in.ElasticsearchConfig != nil {
in, out := &in.ElasticsearchConfig, &out.ElasticsearchConfig
if *in == nil {
*out = nil
} else {
*out = new(ElasticsearchConfig)
**out = **in
}
*out = new(ElasticsearchConfig)
**out = **in
}
if in.SplunkConfig != nil {
in, out := &in.SplunkConfig, &out.SplunkConfig
if *in == nil {
*out = nil
} else {
*out = new(SplunkConfig)
**out = **in
}
*out = new(SplunkConfig)
**out = **in
}
if in.KafkaConfig != nil {
in, out := &in.KafkaConfig, &out.KafkaConfig
if *in == nil {
*out = nil
} else {
*out = new(KafkaConfig)
(*in).DeepCopyInto(*out)
}
*out = new(KafkaConfig)
(*in).DeepCopyInto(*out)
}
if in.SyslogConfig != nil {
in, out := &in.SyslogConfig, &out.SyslogConfig
if *in == nil {
*out = nil
} else {
*out = new(SyslogConfig)
**out = **in
}
*out = new(SyslogConfig)
**out = **in
}
if in.FluentForwarderConfig != nil {
in, out := &in.FluentForwarderConfig, &out.FluentForwarderConfig
if *in == nil {
*out = nil
} else {
*out = new(FluentForwarderConfig)
(*in).DeepCopyInto(*out)
}
*out = new(FluentForwarderConfig)
(*in).DeepCopyInto(*out)
}
return
}
@ -3151,30 +3039,18 @@ func (in *NetworkConfig) DeepCopyInto(out *NetworkConfig) {
}
if in.CalicoNetworkProvider != nil {
in, out := &in.CalicoNetworkProvider, &out.CalicoNetworkProvider
if *in == nil {
*out = nil
} else {
*out = new(CalicoNetworkProvider)
**out = **in
}
*out = new(CalicoNetworkProvider)
**out = **in
}
if in.CanalNetworkProvider != nil {
in, out := &in.CanalNetworkProvider, &out.CanalNetworkProvider
if *in == nil {
*out = nil
} else {
*out = new(CanalNetworkProvider)
**out = **in
}
*out = new(CanalNetworkProvider)
**out = **in
}
if in.FlannelNetworkProvider != nil {
in, out := &in.FlannelNetworkProvider, &out.FlannelNetworkProvider
if *in == nil {
*out = nil
} else {
*out = new(FlannelNetworkProvider)
**out = **in
}
*out = new(FlannelNetworkProvider)
**out = **in
}
return
}
@ -3567,12 +3443,8 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) {
*out = *in
if in.CustomConfig != nil {
in, out := &in.CustomConfig, &out.CustomConfig
if *in == nil {
*out = nil
} else {
*out = new(CustomConfig)
(*in).DeepCopyInto(*out)
}
*out = new(CustomConfig)
(*in).DeepCopyInto(*out)
}
in.InternalNodeSpec.DeepCopyInto(&out.InternalNodeSpec)
if in.DesiredNodeLabels != nil {
@ -3591,12 +3463,8 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) {
}
if in.NodeDrainInput != nil {
in, out := &in.NodeDrainInput, &out.NodeDrainInput
if *in == nil {
*out = nil
} else {
*out = new(NodeDrainInput)
**out = **in
}
*out = new(NodeDrainInput)
**out = **in
}
return
}
@ -3636,21 +3504,13 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
}
if in.NodeTemplateSpec != nil {
in, out := &in.NodeTemplateSpec, &out.NodeTemplateSpec
if *in == nil {
*out = nil
} else {
*out = new(NodeTemplateSpec)
(*in).DeepCopyInto(*out)
}
*out = new(NodeTemplateSpec)
(*in).DeepCopyInto(*out)
}
if in.NodeConfig != nil {
in, out := &in.NodeConfig, &out.NodeConfig
if *in == nil {
*out = nil
} else {
*out = new(RKEConfigNode)
(*in).DeepCopyInto(*out)
}
*out = new(RKEConfigNode)
(*in).DeepCopyInto(*out)
}
if in.NodeAnnotations != nil {
in, out := &in.NodeAnnotations, &out.NodeAnnotations
@ -3675,12 +3535,8 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) {
}
if in.DockerInfo != nil {
in, out := &in.DockerInfo, &out.DockerInfo
if *in == nil {
*out = nil
} else {
*out = new(DockerInfo)
(*in).DeepCopyInto(*out)
}
*out = new(DockerInfo)
(*in).DeepCopyInto(*out)
}
return
}
@ -3816,39 +3672,23 @@ func (in *Notification) DeepCopyInto(out *Notification) {
*out = *in
if in.SMTPConfig != nil {
in, out := &in.SMTPConfig, &out.SMTPConfig
if *in == nil {
*out = nil
} else {
*out = new(SMTPConfig)
**out = **in
}
*out = new(SMTPConfig)
**out = **in
}
if in.SlackConfig != nil {
in, out := &in.SlackConfig, &out.SlackConfig
if *in == nil {
*out = nil
} else {
*out = new(SlackConfig)
**out = **in
}
*out = new(SlackConfig)
**out = **in
}
if in.PagerdutyConfig != nil {
in, out := &in.PagerdutyConfig, &out.PagerdutyConfig
if *in == nil {
*out = nil
} else {
*out = new(PagerdutyConfig)
**out = **in
}
*out = new(PagerdutyConfig)
**out = **in
}
if in.WebhookConfig != nil {
in, out := &in.WebhookConfig, &out.WebhookConfig
if *in == nil {
*out = nil
} else {
*out = new(WebhookConfig)
**out = **in
}
*out = new(WebhookConfig)
**out = **in
}
return
}
@ -3930,39 +3770,23 @@ func (in *NotifierSpec) DeepCopyInto(out *NotifierSpec) {
*out = *in
if in.SMTPConfig != nil {
in, out := &in.SMTPConfig, &out.SMTPConfig
if *in == nil {
*out = nil
} else {
*out = new(SMTPConfig)
**out = **in
}
*out = new(SMTPConfig)
**out = **in
}
if in.SlackConfig != nil {
in, out := &in.SlackConfig, &out.SlackConfig
if *in == nil {
*out = nil
} else {
*out = new(SlackConfig)
**out = **in
}
*out = new(SlackConfig)
**out = **in
}
if in.PagerdutyConfig != nil {
in, out := &in.PagerdutyConfig, &out.PagerdutyConfig
if *in == nil {
*out = nil
} else {
*out = new(PagerdutyConfig)
**out = **in
}
*out = new(PagerdutyConfig)
**out = **in
}
if in.WebhookConfig != nil {
in, out := &in.WebhookConfig, &out.WebhookConfig
if *in == nil {
*out = nil
} else {
*out = new(WebhookConfig)
**out = **in
}
*out = new(WebhookConfig)
**out = **in
}
return
}
@ -4557,21 +4381,13 @@ func (in *ProjectAlertSpec) DeepCopyInto(out *ProjectAlertSpec) {
in.AlertCommonSpec.DeepCopyInto(&out.AlertCommonSpec)
if in.TargetWorkload != nil {
in, out := &in.TargetWorkload, &out.TargetWorkload
if *in == nil {
*out = nil
} else {
*out = new(TargetWorkload)
(*in).DeepCopyInto(*out)
}
*out = new(TargetWorkload)
(*in).DeepCopyInto(*out)
}
if in.TargetPod != nil {
in, out := &in.TargetPod, &out.TargetPod
if *in == nil {
*out = nil
} else {
*out = new(TargetPod)
**out = **in
}
*out = new(TargetPod)
**out = **in
}
return
}
@ -4804,12 +4620,8 @@ func (in *ProjectNetworkPolicy) DeepCopyInto(out *ProjectNetworkPolicy) {
out.Spec = in.Spec
if in.Status != nil {
in, out := &in.Status, &out.Status
if *in == nil {
*out = nil
} else {
*out = new(ProjectNetworkPolicyStatus)
**out = **in
}
*out = new(ProjectNetworkPolicyStatus)
**out = **in
}
return
}
@ -4980,21 +4792,13 @@ func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) {
*out = *in
if in.ResourceQuota != nil {
in, out := &in.ResourceQuota, &out.ResourceQuota
if *in == nil {
*out = nil
} else {
*out = new(ProjectResourceQuota)
**out = **in
}
*out = new(ProjectResourceQuota)
**out = **in
}
if in.NamespaceDefaultResourceQuota != nil {
in, out := &in.NamespaceDefaultResourceQuota, &out.NamespaceDefaultResourceQuota
if *in == nil {
*out = nil
} else {
*out = new(NamespaceResourceQuota)
**out = **in
}
*out = new(NamespaceResourceQuota)
**out = **in
}
return
}
@ -5296,7 +5100,7 @@ func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) {
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]rbac_v1.PolicyRule, len(*in))
*out = make([]rbacv1.PolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -6102,12 +5906,8 @@ func (in *User) DeepCopyInto(out *User) {
}
if in.Enabled != nil {
in, out := &in.Enabled, &out.Enabled
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
*out = new(bool)
**out = **in
}
out.Spec = in.Spec
in.Status.DeepCopyInto(&out.Status)

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -104,6 +106,19 @@ type Client struct {
clusterCatalogControllers map[string]ClusterCatalogController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -26,6 +28,19 @@ type Client struct {
authProviderControllers map[string]AuthProviderController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -1,7 +1,7 @@
package v1
import (
networking_v1 "k8s.io/api/networking/v1"
networkingv1 "k8s.io/api/networking/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]networking_v1.NetworkPolicy, len(*in))
*out = make([]networkingv1.NetworkPolicy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -26,6 +28,19 @@ type Client struct {
networkPolicyControllers map[string]NetworkPolicyController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -468,21 +468,13 @@ func (in *Constraints) DeepCopyInto(out *Constraints) {
*out = *in
if in.Branch != nil {
in, out := &in.Branch, &out.Branch
if *in == nil {
*out = nil
} else {
*out = new(Constraint)
(*in).DeepCopyInto(*out)
}
*out = new(Constraint)
(*in).DeepCopyInto(*out)
}
if in.Event != nil {
in, out := &in.Event, &out.Event
if *in == nil {
*out = nil
} else {
*out = new(Constraint)
(*in).DeepCopyInto(*out)
}
*out = new(Constraint)
(*in).DeepCopyInto(*out)
}
return
}
@ -1162,12 +1154,8 @@ func (in *PipelineConfig) DeepCopyInto(out *PipelineConfig) {
}
if in.Branch != nil {
in, out := &in.Branch, &out.Branch
if *in == nil {
*out = nil
} else {
*out = new(Constraint)
(*in).DeepCopyInto(*out)
}
*out = new(Constraint)
(*in).DeepCopyInto(*out)
}
return
}
@ -1403,12 +1391,8 @@ func (in *PipelineStatus) DeepCopyInto(out *PipelineStatus) {
*out = *in
if in.SourceCodeCredential != nil {
in, out := &in.SourceCodeCredential, &out.SourceCodeCredential
if *in == nil {
*out = nil
} else {
*out = new(SourceCodeCredential)
(*in).DeepCopyInto(*out)
}
*out = new(SourceCodeCredential)
(*in).DeepCopyInto(*out)
}
return
}
@ -2035,12 +2019,8 @@ func (in *Stage) DeepCopyInto(out *Stage) {
}
if in.When != nil {
in, out := &in.When, &out.When
if *in == nil {
*out = nil
} else {
*out = new(Constraints)
(*in).DeepCopyInto(*out)
}
*out = new(Constraints)
(*in).DeepCopyInto(*out)
}
return
}
@ -2081,39 +2061,23 @@ func (in *Step) DeepCopyInto(out *Step) {
*out = *in
if in.SourceCodeConfig != nil {
in, out := &in.SourceCodeConfig, &out.SourceCodeConfig
if *in == nil {
*out = nil
} else {
*out = new(SourceCodeConfig)
**out = **in
}
*out = new(SourceCodeConfig)
**out = **in
}
if in.RunScriptConfig != nil {
in, out := &in.RunScriptConfig, &out.RunScriptConfig
if *in == nil {
*out = nil
} else {
*out = new(RunScriptConfig)
**out = **in
}
*out = new(RunScriptConfig)
**out = **in
}
if in.PublishImageConfig != nil {
in, out := &in.PublishImageConfig, &out.PublishImageConfig
if *in == nil {
*out = nil
} else {
*out = new(PublishImageConfig)
**out = **in
}
*out = new(PublishImageConfig)
**out = **in
}
if in.ApplyYamlConfig != nil {
in, out := &in.ApplyYamlConfig, &out.ApplyYamlConfig
if *in == nil {
*out = nil
} else {
*out = new(ApplyYamlConfig)
**out = **in
}
*out = new(ApplyYamlConfig)
**out = **in
}
if in.Env != nil {
in, out := &in.Env, &out.Env
@ -2129,12 +2093,8 @@ func (in *Step) DeepCopyInto(out *Step) {
}
if in.When != nil {
in, out := &in.When, &out.When
if *in == nil {
*out = nil
} else {
*out = new(Constraints)
(*in).DeepCopyInto(*out)
}
*out = new(Constraints)
(*in).DeepCopyInto(*out)
}
return
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -64,6 +66,19 @@ type Client struct {
sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -1,7 +1,7 @@
package v1
import (
rbac_v1 "k8s.io/api/rbac/v1"
rbacv1 "k8s.io/api/rbac/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@ -12,7 +12,7 @@ func (in *ClusterRoleBindingList) DeepCopyInto(out *ClusterRoleBindingList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]rbac_v1.ClusterRoleBinding, len(*in))
*out = make([]rbacv1.ClusterRoleBinding, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -45,7 +45,7 @@ func (in *ClusterRoleList) DeepCopyInto(out *ClusterRoleList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]rbac_v1.ClusterRole, len(*in))
*out = make([]rbacv1.ClusterRole, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -78,7 +78,7 @@ func (in *RoleBindingList) DeepCopyInto(out *RoleBindingList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]rbac_v1.RoleBinding, len(*in))
*out = make([]rbacv1.RoleBinding, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@ -111,7 +111,7 @@ func (in *RoleList) DeepCopyInto(out *RoleList) {
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]rbac_v1.Role, len(*in))
*out = make([]rbacv1.Role, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@ -11,6 +11,8 @@ import (
"k8s.io/client-go/rest"
)
type contextKeyType struct{}
type Interface interface {
RESTClient() rest.Interface
controller.Starter
@ -32,6 +34,19 @@ type Client struct {
roleControllers map[string]RoleController
}
func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) {
c, err := NewForConfig(config)
if err != nil {
return ctx, nil, err
}
return context.WithValue(ctx, contextKeyType{}, c), c, nil
}
func From(ctx context.Context) Interface {
return ctx.Value(contextKeyType{}).(Interface)
}
func NewForConfig(config rest.Config) (Interface, error) {
if config.NegotiatedSerializer == nil {
config.NegotiatedSerializer = dynamic.NegotiatedSerializer

View File

@ -0,0 +1,16 @@
package client
const (
CinderPersistentVolumeSourceType = "cinderPersistentVolumeSource"
CinderPersistentVolumeSourceFieldFSType = "fsType"
CinderPersistentVolumeSourceFieldReadOnly = "readOnly"
CinderPersistentVolumeSourceFieldSecretRef = "secretRef"
CinderPersistentVolumeSourceFieldVolumeID = "volumeID"
)
type CinderPersistentVolumeSource struct {
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
SecretRef *SecretReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"`
}

View File

@ -1,14 +0,0 @@
package client
const (
CinderVolumeSourceType = "cinderVolumeSource"
CinderVolumeSourceFieldFSType = "fsType"
CinderVolumeSourceFieldReadOnly = "readOnly"
CinderVolumeSourceFieldVolumeID = "volumeID"
)
type CinderVolumeSource struct {
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"`
}

View File

@ -1,10 +1,12 @@
package client
const (
LocalVolumeSourceType = "localVolumeSource"
LocalVolumeSourceFieldPath = "path"
LocalVolumeSourceType = "localVolumeSource"
LocalVolumeSourceFieldFSType = "fsType"
LocalVolumeSourceFieldPath = "path"
)
type LocalVolumeSource struct {
Path string `json:"path,omitempty" yaml:"path,omitempty"`
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
}

View File

@ -3,8 +3,10 @@ package client
const (
NodeSelectorTermType = "nodeSelectorTerm"
NodeSelectorTermFieldMatchExpressions = "matchExpressions"
NodeSelectorTermFieldMatchFields = "matchFields"
)
type NodeSelectorTerm struct {
MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" yaml:"matchExpressions,omitempty"`
MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" yaml:"matchFields,omitempty"`
}

View File

@ -61,7 +61,7 @@ type PersistentVolume struct {
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" yaml:"csi,omitempty"`
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" yaml:"cephfs,omitempty"`
Cinder *CinderVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"`
Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"`
ClaimRef *ObjectReference `json:"claimRef,omitempty" yaml:"claimRef,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`

View File

@ -42,7 +42,7 @@ type PersistentVolumeSpec struct {
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" yaml:"csi,omitempty"`
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" yaml:"cephfs,omitempty"`
Cinder *CinderVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"`
Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"`
ClaimRef *ObjectReference `json:"claimRef,omitempty" yaml:"claimRef,omitempty"`
FC *FCVolumeSource `json:"fc,omitempty" yaml:"fc,omitempty"`
FlexVolume *FlexPersistentVolumeSource `json:"flexVolume,omitempty" yaml:"flexVolume,omitempty"`

View File

@ -7,6 +7,7 @@ import (
const (
StorageClassType = "storageClass"
StorageClassFieldAllowVolumeExpansion = "allowVolumeExpansion"
StorageClassFieldAllowedTopologies = "allowedTopologies"
StorageClassFieldAnnotations = "annotations"
StorageClassFieldCreated = "created"
StorageClassFieldCreatorID = "creatorId"
@ -25,21 +26,22 @@ const (
type StorageClass struct {
types.Resource
AllowVolumeExpansion *bool `json:"allowVolumeExpansion,omitempty" yaml:"allowVolumeExpansion,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
MountOptions []string `json:"mountOptions,omitempty" yaml:"mountOptions,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
Parameters map[string]string `json:"parameters,omitempty" yaml:"parameters,omitempty"`
Provisioner string `json:"provisioner,omitempty" yaml:"provisioner,omitempty"`
ReclaimPolicy string `json:"reclaimPolicy,omitempty" yaml:"reclaimPolicy,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
VolumeBindingMode string `json:"volumeBindingMode,omitempty" yaml:"volumeBindingMode,omitempty"`
AllowVolumeExpansion *bool `json:"allowVolumeExpansion,omitempty" yaml:"allowVolumeExpansion,omitempty"`
AllowedTopologies []TopologySelectorTerm `json:"allowedTopologies,omitempty" yaml:"allowedTopologies,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
MountOptions []string `json:"mountOptions,omitempty" yaml:"mountOptions,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"`
Parameters map[string]string `json:"parameters,omitempty" yaml:"parameters,omitempty"`
Provisioner string `json:"provisioner,omitempty" yaml:"provisioner,omitempty"`
ReclaimPolicy string `json:"reclaimPolicy,omitempty" yaml:"reclaimPolicy,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
VolumeBindingMode string `json:"volumeBindingMode,omitempty" yaml:"volumeBindingMode,omitempty"`
}
type StorageClassCollection struct {

View File

@ -0,0 +1,12 @@
package client
const (
TopologySelectorLabelRequirementType = "topologySelectorLabelRequirement"
TopologySelectorLabelRequirementFieldKey = "key"
TopologySelectorLabelRequirementFieldValues = "values"
)
type TopologySelectorLabelRequirement struct {
Key string `json:"key,omitempty" yaml:"key,omitempty"`
Values []string `json:"values,omitempty" yaml:"values,omitempty"`
}

View File

@ -0,0 +1,10 @@
package client
const (
TopologySelectorTermType = "topologySelectorTerm"
TopologySelectorTermFieldMatchLabelExpressions = "matchLabelExpressions"
)
type TopologySelectorTerm struct {
MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" yaml:"matchLabelExpressions,omitempty"`
}

View File

@ -3,8 +3,10 @@ package client
const (
AllowedHostPathType = "allowedHostPath"
AllowedHostPathFieldPathPrefix = "pathPrefix"
AllowedHostPathFieldReadOnly = "readOnly"
)
type AllowedHostPath struct {
PathPrefix string `json:"pathPrefix,omitempty" yaml:"pathPrefix,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
}

View File

@ -0,0 +1,18 @@
package client
const (
ConfigMapNodeConfigSourceType = "configMapNodeConfigSource"
ConfigMapNodeConfigSourceFieldKubeletConfigKey = "kubeletConfigKey"
ConfigMapNodeConfigSourceFieldName = "name"
ConfigMapNodeConfigSourceFieldNamespace = "namespace"
ConfigMapNodeConfigSourceFieldResourceVersion = "resourceVersion"
ConfigMapNodeConfigSourceFieldUID = "uid"
)
type ConfigMapNodeConfigSource struct {
KubeletConfigKey string `json:"kubeletConfigKey,omitempty" yaml:"kubeletConfigKey,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
ResourceVersion string `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"`
UID string `json:"uid,omitempty" yaml:"uid,omitempty"`
}

View File

@ -4,6 +4,7 @@ const (
InternalNodeStatusType = "internalNodeStatus"
InternalNodeStatusFieldAllocatable = "allocatable"
InternalNodeStatusFieldCapacity = "capacity"
InternalNodeStatusFieldConfig = "config"
InternalNodeStatusFieldExternalIPAddress = "externalIpAddress"
InternalNodeStatusFieldHostname = "hostname"
InternalNodeStatusFieldIPAddress = "ipAddress"
@ -16,6 +17,7 @@ const (
type InternalNodeStatus struct {
Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"`
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
Config *NodeConfigStatus `json:"config,omitempty" yaml:"config,omitempty"`
ExternalIPAddress string `json:"externalIpAddress,omitempty" yaml:"externalIpAddress,omitempty"`
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
IPAddress string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"`

View File

@ -11,6 +11,7 @@ const (
NodeFieldCapacity = "capacity"
NodeFieldClusterID = "clusterId"
NodeFieldConditions = "conditions"
NodeFieldConfig = "config"
NodeFieldControlPlane = "controlPlane"
NodeFieldCreated = "created"
NodeFieldCreatorID = "creatorId"
@ -57,6 +58,7 @@ type Node struct {
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"`
Conditions []NodeCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
Config *NodeConfigStatus `json:"config,omitempty" yaml:"config,omitempty"`
ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`

View File

@ -1,14 +1,10 @@
package client
const (
NodeConfigSourceType = "nodeConfigSource"
NodeConfigSourceFieldAPIVersion = "apiVersion"
NodeConfigSourceFieldConfigMapRef = "configMapRef"
NodeConfigSourceFieldKind = "kind"
NodeConfigSourceType = "nodeConfigSource"
NodeConfigSourceFieldConfigMap = "configMap"
)
type NodeConfigSource struct {
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
ConfigMapRef *ObjectReference `json:"configMapRef,omitempty" yaml:"configMapRef,omitempty"`
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
ConfigMap *ConfigMapNodeConfigSource `json:"configMap,omitempty" yaml:"configMap,omitempty"`
}

View File

@ -0,0 +1,16 @@
package client
const (
NodeConfigStatusType = "nodeConfigStatus"
NodeConfigStatusFieldActive = "active"
NodeConfigStatusFieldAssigned = "assigned"
NodeConfigStatusFieldError = "error"
NodeConfigStatusFieldLastKnownGood = "lastKnownGood"
)
type NodeConfigStatus struct {
Active *NodeConfigSource `json:"active,omitempty" yaml:"active,omitempty"`
Assigned *NodeConfigSource `json:"assigned,omitempty" yaml:"assigned,omitempty"`
Error string `json:"error,omitempty" yaml:"error,omitempty"`
LastKnownGood *NodeConfigSource `json:"lastKnownGood,omitempty" yaml:"lastKnownGood,omitempty"`
}

View File

@ -5,6 +5,7 @@ const (
NodeStatusFieldAllocatable = "allocatable"
NodeStatusFieldCapacity = "capacity"
NodeStatusFieldConditions = "conditions"
NodeStatusFieldConfig = "config"
NodeStatusFieldDockerInfo = "dockerInfo"
NodeStatusFieldExternalIPAddress = "externalIpAddress"
NodeStatusFieldHostname = "hostname"
@ -25,6 +26,7 @@ type NodeStatus struct {
Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"`
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
Conditions []NodeCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
Config *NodeConfigStatus `json:"config,omitempty" yaml:"config,omitempty"`
DockerInfo *DockerInfo `json:"dockerInfo,omitempty" yaml:"dockerInfo,omitempty"`
ExternalIPAddress string `json:"externalIpAddress,omitempty" yaml:"externalIpAddress,omitempty"`
Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`

View File

@ -6,9 +6,12 @@ const (
PodSecurityPolicySpecFieldAllowedCapabilities = "allowedCapabilities"
PodSecurityPolicySpecFieldAllowedFlexVolumes = "allowedFlexVolumes"
PodSecurityPolicySpecFieldAllowedHostPaths = "allowedHostPaths"
PodSecurityPolicySpecFieldAllowedProcMountTypes = "allowedProcMountTypes"
PodSecurityPolicySpecFieldAllowedUnsafeSysctls = "allowedUnsafeSysctls"
PodSecurityPolicySpecFieldDefaultAddCapabilities = "defaultAddCapabilities"
PodSecurityPolicySpecFieldDefaultAllowPrivilegeEscalation = "defaultAllowPrivilegeEscalation"
PodSecurityPolicySpecFieldFSGroup = "fsGroup"
PodSecurityPolicySpecFieldForbiddenSysctls = "forbiddenSysctls"
PodSecurityPolicySpecFieldHostIPC = "hostIPC"
PodSecurityPolicySpecFieldHostNetwork = "hostNetwork"
PodSecurityPolicySpecFieldHostPID = "hostPID"
@ -27,9 +30,12 @@ type PodSecurityPolicySpec struct {
AllowedCapabilities []string `json:"allowedCapabilities,omitempty" yaml:"allowedCapabilities,omitempty"`
AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" yaml:"allowedFlexVolumes,omitempty"`
AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" yaml:"allowedHostPaths,omitempty"`
AllowedProcMountTypes []string `json:"allowedProcMountTypes,omitempty" yaml:"allowedProcMountTypes,omitempty"`
AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty" yaml:"allowedUnsafeSysctls,omitempty"`
DefaultAddCapabilities []string `json:"defaultAddCapabilities,omitempty" yaml:"defaultAddCapabilities,omitempty"`
DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" yaml:"defaultAllowPrivilegeEscalation,omitempty"`
FSGroup *FSGroupStrategyOptions `json:"fsGroup,omitempty" yaml:"fsGroup,omitempty"`
ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" yaml:"forbiddenSysctls,omitempty"`
HostIPC bool `json:"hostIPC,omitempty" yaml:"hostIPC,omitempty"`
HostNetwork bool `json:"hostNetwork,omitempty" yaml:"hostNetwork,omitempty"`
HostPID bool `json:"hostPID,omitempty" yaml:"hostPID,omitempty"`

View File

@ -10,6 +10,8 @@ const (
PodSecurityPolicyTemplateFieldAllowedCapabilities = "allowedCapabilities"
PodSecurityPolicyTemplateFieldAllowedFlexVolumes = "allowedFlexVolumes"
PodSecurityPolicyTemplateFieldAllowedHostPaths = "allowedHostPaths"
PodSecurityPolicyTemplateFieldAllowedProcMountTypes = "allowedProcMountTypes"
PodSecurityPolicyTemplateFieldAllowedUnsafeSysctls = "allowedUnsafeSysctls"
PodSecurityPolicyTemplateFieldAnnotations = "annotations"
PodSecurityPolicyTemplateFieldCreated = "created"
PodSecurityPolicyTemplateFieldCreatorID = "creatorId"
@ -17,6 +19,7 @@ const (
PodSecurityPolicyTemplateFieldDefaultAllowPrivilegeEscalation = "defaultAllowPrivilegeEscalation"
PodSecurityPolicyTemplateFieldDescription = "description"
PodSecurityPolicyTemplateFieldFSGroup = "fsGroup"
PodSecurityPolicyTemplateFieldForbiddenSysctls = "forbiddenSysctls"
PodSecurityPolicyTemplateFieldHostIPC = "hostIPC"
PodSecurityPolicyTemplateFieldHostNetwork = "hostNetwork"
PodSecurityPolicyTemplateFieldHostPID = "hostPID"
@ -41,6 +44,8 @@ type PodSecurityPolicyTemplate struct {
AllowedCapabilities []string `json:"allowedCapabilities,omitempty" yaml:"allowedCapabilities,omitempty"`
AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" yaml:"allowedFlexVolumes,omitempty"`
AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" yaml:"allowedHostPaths,omitempty"`
AllowedProcMountTypes []string `json:"allowedProcMountTypes,omitempty" yaml:"allowedProcMountTypes,omitempty"`
AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty" yaml:"allowedUnsafeSysctls,omitempty"`
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
@ -48,6 +53,7 @@ type PodSecurityPolicyTemplate struct {
DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" yaml:"defaultAllowPrivilegeEscalation,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
FSGroup *FSGroupStrategyOptions `json:"fsGroup,omitempty" yaml:"fsGroup,omitempty"`
ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" yaml:"forbiddenSysctls,omitempty"`
HostIPC bool `json:"hostIPC,omitempty" yaml:"hostIPC,omitempty"`
HostNetwork bool `json:"hostNetwork,omitempty" yaml:"hostNetwork,omitempty"`
HostPID bool `json:"hostPID,omitempty" yaml:"hostPID,omitempty"`

View File

@ -0,0 +1,16 @@
package client
const (
CinderPersistentVolumeSourceType = "cinderPersistentVolumeSource"
CinderPersistentVolumeSourceFieldFSType = "fsType"
CinderPersistentVolumeSourceFieldReadOnly = "readOnly"
CinderPersistentVolumeSourceFieldSecretRef = "secretRef"
CinderPersistentVolumeSourceFieldVolumeID = "volumeID"
)
type CinderPersistentVolumeSource struct {
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
SecretRef *SecretReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"`
}

View File

@ -1,14 +1,16 @@
package client
const (
CinderVolumeSourceType = "cinderVolumeSource"
CinderVolumeSourceFieldFSType = "fsType"
CinderVolumeSourceFieldReadOnly = "readOnly"
CinderVolumeSourceFieldVolumeID = "volumeID"
CinderVolumeSourceType = "cinderVolumeSource"
CinderVolumeSourceFieldFSType = "fsType"
CinderVolumeSourceFieldReadOnly = "readOnly"
CinderVolumeSourceFieldSecretRef = "secretRef"
CinderVolumeSourceFieldVolumeID = "volumeID"
)
type CinderVolumeSource struct {
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"`
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"`
}

View File

@ -19,6 +19,7 @@ const (
ContainerFieldPostStart = "postStart"
ContainerFieldPreStop = "preStop"
ContainerFieldPrivileged = "privileged"
ContainerFieldProcMount = "procMount"
ContainerFieldReadOnly = "readOnly"
ContainerFieldReadinessProbe = "readinessProbe"
ContainerFieldResources = "resources"
@ -57,6 +58,7 @@ type Container struct {
PostStart *Handler `json:"postStart,omitempty" yaml:"postStart,omitempty"`
PreStop *Handler `json:"preStop,omitempty" yaml:"preStop,omitempty"`
Privileged *bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
ProcMount string `json:"procMount,omitempty" yaml:"procMount,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty" yaml:"readinessProbe,omitempty"`
Resources *ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"`

View File

@ -33,10 +33,12 @@ const (
CronJobFieldPriorityClassName = "priorityClassName"
CronJobFieldProjectID = "projectId"
CronJobFieldPublicEndpoints = "publicEndpoints"
CronJobFieldReadinessGates = "readinessGates"
CronJobFieldRemoved = "removed"
CronJobFieldRestartPolicy = "restartPolicy"
CronJobFieldRunAsGroup = "runAsGroup"
CronJobFieldRunAsNonRoot = "runAsNonRoot"
CronJobFieldRuntimeClassName = "runtimeClassName"
CronJobFieldSchedulerName = "schedulerName"
CronJobFieldScheduling = "scheduling"
CronJobFieldSelector = "selector"
@ -44,6 +46,8 @@ const (
CronJobFieldShareProcessNamespace = "shareProcessNamespace"
CronJobFieldState = "state"
CronJobFieldSubdomain = "subdomain"
CronJobFieldSysctls = "sysctls"
CronJobFieldTTLSecondsAfterFinished = "ttlSecondsAfterFinished"
CronJobFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
CronJobFieldTransitioning = "transitioning"
CronJobFieldTransitioningMessage = "transitioningMessage"
@ -83,10 +87,12 @@ type CronJob struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
@ -94,6 +100,8 @@ type CronJob struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty" yaml:"ttlSecondsAfterFinished,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -20,15 +20,19 @@ const (
CronJobSpecFieldObjectMeta = "metadata"
CronJobSpecFieldPriority = "priority"
CronJobSpecFieldPriorityClassName = "priorityClassName"
CronJobSpecFieldReadinessGates = "readinessGates"
CronJobSpecFieldRestartPolicy = "restartPolicy"
CronJobSpecFieldRunAsGroup = "runAsGroup"
CronJobSpecFieldRunAsNonRoot = "runAsNonRoot"
CronJobSpecFieldRuntimeClassName = "runtimeClassName"
CronJobSpecFieldSchedulerName = "schedulerName"
CronJobSpecFieldScheduling = "scheduling"
CronJobSpecFieldSelector = "selector"
CronJobSpecFieldServiceAccountName = "serviceAccountName"
CronJobSpecFieldShareProcessNamespace = "shareProcessNamespace"
CronJobSpecFieldSubdomain = "subdomain"
CronJobSpecFieldSysctls = "sysctls"
CronJobSpecFieldTTLSecondsAfterFinished = "ttlSecondsAfterFinished"
CronJobSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
CronJobSpecFieldUid = "uid"
CronJobSpecFieldVolumes = "volumes"
@ -53,15 +57,19 @@ type CronJobSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty" yaml:"ttlSecondsAfterFinished,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -33,10 +33,12 @@ const (
DaemonSetFieldPriorityClassName = "priorityClassName"
DaemonSetFieldProjectID = "projectId"
DaemonSetFieldPublicEndpoints = "publicEndpoints"
DaemonSetFieldReadinessGates = "readinessGates"
DaemonSetFieldRemoved = "removed"
DaemonSetFieldRestartPolicy = "restartPolicy"
DaemonSetFieldRunAsGroup = "runAsGroup"
DaemonSetFieldRunAsNonRoot = "runAsNonRoot"
DaemonSetFieldRuntimeClassName = "runtimeClassName"
DaemonSetFieldSchedulerName = "schedulerName"
DaemonSetFieldScheduling = "scheduling"
DaemonSetFieldSelector = "selector"
@ -44,6 +46,7 @@ const (
DaemonSetFieldShareProcessNamespace = "shareProcessNamespace"
DaemonSetFieldState = "state"
DaemonSetFieldSubdomain = "subdomain"
DaemonSetFieldSysctls = "sysctls"
DaemonSetFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
DaemonSetFieldTransitioning = "transitioning"
DaemonSetFieldTransitioningMessage = "transitioningMessage"
@ -83,10 +86,12 @@ type DaemonSet struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
@ -94,6 +99,7 @@ type DaemonSet struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -20,15 +20,18 @@ const (
DaemonSetSpecFieldObjectMeta = "metadata"
DaemonSetSpecFieldPriority = "priority"
DaemonSetSpecFieldPriorityClassName = "priorityClassName"
DaemonSetSpecFieldReadinessGates = "readinessGates"
DaemonSetSpecFieldRestartPolicy = "restartPolicy"
DaemonSetSpecFieldRunAsGroup = "runAsGroup"
DaemonSetSpecFieldRunAsNonRoot = "runAsNonRoot"
DaemonSetSpecFieldRuntimeClassName = "runtimeClassName"
DaemonSetSpecFieldSchedulerName = "schedulerName"
DaemonSetSpecFieldScheduling = "scheduling"
DaemonSetSpecFieldSelector = "selector"
DaemonSetSpecFieldServiceAccountName = "serviceAccountName"
DaemonSetSpecFieldShareProcessNamespace = "shareProcessNamespace"
DaemonSetSpecFieldSubdomain = "subdomain"
DaemonSetSpecFieldSysctls = "sysctls"
DaemonSetSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
DaemonSetSpecFieldUid = "uid"
DaemonSetSpecFieldVolumes = "volumes"
@ -53,15 +56,18 @@ type DaemonSetSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -34,10 +34,12 @@ const (
DeploymentFieldPriorityClassName = "priorityClassName"
DeploymentFieldProjectID = "projectId"
DeploymentFieldPublicEndpoints = "publicEndpoints"
DeploymentFieldReadinessGates = "readinessGates"
DeploymentFieldRemoved = "removed"
DeploymentFieldRestartPolicy = "restartPolicy"
DeploymentFieldRunAsGroup = "runAsGroup"
DeploymentFieldRunAsNonRoot = "runAsNonRoot"
DeploymentFieldRuntimeClassName = "runtimeClassName"
DeploymentFieldScale = "scale"
DeploymentFieldSchedulerName = "schedulerName"
DeploymentFieldScheduling = "scheduling"
@ -46,6 +48,7 @@ const (
DeploymentFieldShareProcessNamespace = "shareProcessNamespace"
DeploymentFieldState = "state"
DeploymentFieldSubdomain = "subdomain"
DeploymentFieldSysctls = "sysctls"
DeploymentFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
DeploymentFieldTransitioning = "transitioning"
DeploymentFieldTransitioningMessage = "transitioningMessage"
@ -86,10 +89,12 @@ type Deployment struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -98,6 +103,7 @@ type Deployment struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -21,9 +21,11 @@ const (
DeploymentSpecFieldPaused = "paused"
DeploymentSpecFieldPriority = "priority"
DeploymentSpecFieldPriorityClassName = "priorityClassName"
DeploymentSpecFieldReadinessGates = "readinessGates"
DeploymentSpecFieldRestartPolicy = "restartPolicy"
DeploymentSpecFieldRunAsGroup = "runAsGroup"
DeploymentSpecFieldRunAsNonRoot = "runAsNonRoot"
DeploymentSpecFieldRuntimeClassName = "runtimeClassName"
DeploymentSpecFieldScale = "scale"
DeploymentSpecFieldSchedulerName = "schedulerName"
DeploymentSpecFieldScheduling = "scheduling"
@ -31,6 +33,7 @@ const (
DeploymentSpecFieldServiceAccountName = "serviceAccountName"
DeploymentSpecFieldShareProcessNamespace = "shareProcessNamespace"
DeploymentSpecFieldSubdomain = "subdomain"
DeploymentSpecFieldSysctls = "sysctls"
DeploymentSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
DeploymentSpecFieldUid = "uid"
DeploymentSpecFieldVolumes = "volumes"
@ -56,9 +59,11 @@ type DeploymentSpec struct {
Paused bool `json:"paused,omitempty" yaml:"paused,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -66,6 +71,7 @@ type DeploymentSpec struct {
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -33,10 +33,12 @@ const (
JobFieldPriorityClassName = "priorityClassName"
JobFieldProjectID = "projectId"
JobFieldPublicEndpoints = "publicEndpoints"
JobFieldReadinessGates = "readinessGates"
JobFieldRemoved = "removed"
JobFieldRestartPolicy = "restartPolicy"
JobFieldRunAsGroup = "runAsGroup"
JobFieldRunAsNonRoot = "runAsNonRoot"
JobFieldRuntimeClassName = "runtimeClassName"
JobFieldSchedulerName = "schedulerName"
JobFieldScheduling = "scheduling"
JobFieldSelector = "selector"
@ -44,6 +46,8 @@ const (
JobFieldShareProcessNamespace = "shareProcessNamespace"
JobFieldState = "state"
JobFieldSubdomain = "subdomain"
JobFieldSysctls = "sysctls"
JobFieldTTLSecondsAfterFinished = "ttlSecondsAfterFinished"
JobFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
JobFieldTransitioning = "transitioning"
JobFieldTransitioningMessage = "transitioningMessage"
@ -83,10 +87,12 @@ type Job struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
@ -94,6 +100,8 @@ type Job struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty" yaml:"ttlSecondsAfterFinished,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -20,15 +20,19 @@ const (
JobSpecFieldObjectMeta = "metadata"
JobSpecFieldPriority = "priority"
JobSpecFieldPriorityClassName = "priorityClassName"
JobSpecFieldReadinessGates = "readinessGates"
JobSpecFieldRestartPolicy = "restartPolicy"
JobSpecFieldRunAsGroup = "runAsGroup"
JobSpecFieldRunAsNonRoot = "runAsNonRoot"
JobSpecFieldRuntimeClassName = "runtimeClassName"
JobSpecFieldSchedulerName = "schedulerName"
JobSpecFieldScheduling = "scheduling"
JobSpecFieldSelector = "selector"
JobSpecFieldServiceAccountName = "serviceAccountName"
JobSpecFieldShareProcessNamespace = "shareProcessNamespace"
JobSpecFieldSubdomain = "subdomain"
JobSpecFieldSysctls = "sysctls"
JobSpecFieldTTLSecondsAfterFinished = "ttlSecondsAfterFinished"
JobSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
JobSpecFieldUid = "uid"
JobSpecFieldVolumes = "volumes"
@ -53,15 +57,19 @@ type JobSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty" yaml:"ttlSecondsAfterFinished,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -21,15 +21,19 @@ const (
JobTemplateSpecFieldObjectMeta = "metadata"
JobTemplateSpecFieldPriority = "priority"
JobTemplateSpecFieldPriorityClassName = "priorityClassName"
JobTemplateSpecFieldReadinessGates = "readinessGates"
JobTemplateSpecFieldRestartPolicy = "restartPolicy"
JobTemplateSpecFieldRunAsGroup = "runAsGroup"
JobTemplateSpecFieldRunAsNonRoot = "runAsNonRoot"
JobTemplateSpecFieldRuntimeClassName = "runtimeClassName"
JobTemplateSpecFieldSchedulerName = "schedulerName"
JobTemplateSpecFieldScheduling = "scheduling"
JobTemplateSpecFieldSelector = "selector"
JobTemplateSpecFieldServiceAccountName = "serviceAccountName"
JobTemplateSpecFieldShareProcessNamespace = "shareProcessNamespace"
JobTemplateSpecFieldSubdomain = "subdomain"
JobTemplateSpecFieldSysctls = "sysctls"
JobTemplateSpecFieldTTLSecondsAfterFinished = "ttlSecondsAfterFinished"
JobTemplateSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
JobTemplateSpecFieldUid = "uid"
JobTemplateSpecFieldVolumes = "volumes"
@ -55,15 +59,19 @@ type JobTemplateSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty" yaml:"ttlSecondsAfterFinished,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -1,10 +1,12 @@
package client
const (
LocalVolumeSourceType = "localVolumeSource"
LocalVolumeSourceFieldPath = "path"
LocalVolumeSourceType = "localVolumeSource"
LocalVolumeSourceFieldFSType = "fsType"
LocalVolumeSourceFieldPath = "path"
)
type LocalVolumeSource struct {
Path string `json:"path,omitempty" yaml:"path,omitempty"`
FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
}

View File

@ -3,8 +3,10 @@ package client
const (
NodeSelectorTermType = "nodeSelectorTerm"
NodeSelectorTermFieldMatchExpressions = "matchExpressions"
NodeSelectorTermFieldMatchFields = "matchFields"
)
type NodeSelectorTerm struct {
MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" yaml:"matchExpressions,omitempty"`
MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" yaml:"matchFields,omitempty"`
}

View File

@ -10,6 +10,7 @@ const (
PersistentVolumeClaimFieldAnnotations = "annotations"
PersistentVolumeClaimFieldCreated = "created"
PersistentVolumeClaimFieldCreatorID = "creatorId"
PersistentVolumeClaimFieldDataSource = "dataSource"
PersistentVolumeClaimFieldLabels = "labels"
PersistentVolumeClaimFieldName = "name"
PersistentVolumeClaimFieldNamespaceId = "namespaceId"
@ -34,6 +35,7 @@ type PersistentVolumeClaim struct {
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
DataSource *TypedLocalObjectReference `json:"dataSource,omitempty" yaml:"dataSource,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"`

View File

@ -3,6 +3,7 @@ package client
const (
PersistentVolumeClaimSpecType = "persistentVolumeClaimSpec"
PersistentVolumeClaimSpecFieldAccessModes = "accessModes"
PersistentVolumeClaimSpecFieldDataSource = "dataSource"
PersistentVolumeClaimSpecFieldResources = "resources"
PersistentVolumeClaimSpecFieldSelector = "selector"
PersistentVolumeClaimSpecFieldStorageClassID = "storageClassId"
@ -11,10 +12,11 @@ const (
)
type PersistentVolumeClaimSpec struct {
AccessModes []string `json:"accessModes,omitempty" yaml:"accessModes,omitempty"`
Resources *ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
StorageClassID string `json:"storageClassId,omitempty" yaml:"storageClassId,omitempty"`
VolumeID string `json:"volumeId,omitempty" yaml:"volumeId,omitempty"`
VolumeMode string `json:"volumeMode,omitempty" yaml:"volumeMode,omitempty"`
AccessModes []string `json:"accessModes,omitempty" yaml:"accessModes,omitempty"`
DataSource *TypedLocalObjectReference `json:"dataSource,omitempty" yaml:"dataSource,omitempty"`
Resources *ResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"`
Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"`
StorageClassID string `json:"storageClassId,omitempty" yaml:"storageClassId,omitempty"`
VolumeID string `json:"volumeId,omitempty" yaml:"volumeId,omitempty"`
VolumeMode string `json:"volumeMode,omitempty" yaml:"volumeMode,omitempty"`
}

View File

@ -42,7 +42,7 @@ type PersistentVolumeSpec struct {
CSI *CSIPersistentVolumeSource `json:"csi,omitempty" yaml:"csi,omitempty"`
Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"`
CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" yaml:"cephfs,omitempty"`
Cinder *CinderVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"`
Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"`
ClaimRef *ObjectReference `json:"claimRef,omitempty" yaml:"claimRef,omitempty"`
FC *FCVolumeSource `json:"fc,omitempty" yaml:"fc,omitempty"`
FlexVolume *FlexPersistentVolumeSource `json:"flexVolume,omitempty" yaml:"flexVolume,omitempty"`

View File

@ -32,10 +32,12 @@ const (
PodFieldPriorityClassName = "priorityClassName"
PodFieldProjectID = "projectId"
PodFieldPublicEndpoints = "publicEndpoints"
PodFieldReadinessGates = "readinessGates"
PodFieldRemoved = "removed"
PodFieldRestartPolicy = "restartPolicy"
PodFieldRunAsGroup = "runAsGroup"
PodFieldRunAsNonRoot = "runAsNonRoot"
PodFieldRuntimeClassName = "runtimeClassName"
PodFieldSchedulerName = "schedulerName"
PodFieldScheduling = "scheduling"
PodFieldServiceAccountName = "serviceAccountName"
@ -43,6 +45,7 @@ const (
PodFieldState = "state"
PodFieldStatus = "status"
PodFieldSubdomain = "subdomain"
PodFieldSysctls = "sysctls"
PodFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
PodFieldTransitioning = "transitioning"
PodFieldTransitioningMessage = "transitioningMessage"
@ -80,10 +83,12 @@ type Pod struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
@ -91,6 +96,7 @@ type Pod struct {
State string `json:"state,omitempty" yaml:"state,omitempty"`
Status *PodStatus `json:"status,omitempty" yaml:"status,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -0,0 +1,10 @@
package client
const (
PodReadinessGateType = "podReadinessGate"
PodReadinessGateFieldConditionType = "conditionType"
)
type PodReadinessGate struct {
ConditionType string `json:"conditionType,omitempty" yaml:"conditionType,omitempty"`
}

View File

@ -6,13 +6,15 @@ const (
PodSecurityContextFieldGids = "gids"
PodSecurityContextFieldRunAsGroup = "runAsGroup"
PodSecurityContextFieldRunAsNonRoot = "runAsNonRoot"
PodSecurityContextFieldSysctls = "sysctls"
PodSecurityContextFieldUid = "uid"
)
type PodSecurityContext struct {
Fsgid *int64 `json:"fsgid,omitempty" yaml:"fsgid,omitempty"`
Gids []int64 `json:"gids,omitempty" yaml:"gids,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Fsgid *int64 `json:"fsgid,omitempty" yaml:"fsgid,omitempty"`
Gids []int64 `json:"gids,omitempty" yaml:"gids,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
}

View File

@ -18,14 +18,17 @@ const (
PodSpecFieldNodeID = "nodeId"
PodSpecFieldPriority = "priority"
PodSpecFieldPriorityClassName = "priorityClassName"
PodSpecFieldReadinessGates = "readinessGates"
PodSpecFieldRestartPolicy = "restartPolicy"
PodSpecFieldRunAsGroup = "runAsGroup"
PodSpecFieldRunAsNonRoot = "runAsNonRoot"
PodSpecFieldRuntimeClassName = "runtimeClassName"
PodSpecFieldSchedulerName = "schedulerName"
PodSpecFieldScheduling = "scheduling"
PodSpecFieldServiceAccountName = "serviceAccountName"
PodSpecFieldShareProcessNamespace = "shareProcessNamespace"
PodSpecFieldSubdomain = "subdomain"
PodSpecFieldSysctls = "sysctls"
PodSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
PodSpecFieldUid = "uid"
PodSpecFieldVolumes = "volumes"
@ -48,14 +51,17 @@ type PodSpec struct {
NodeID string `json:"nodeId,omitempty" yaml:"nodeId,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -19,14 +19,17 @@ const (
PodTemplateSpecFieldObjectMeta = "metadata"
PodTemplateSpecFieldPriority = "priority"
PodTemplateSpecFieldPriorityClassName = "priorityClassName"
PodTemplateSpecFieldReadinessGates = "readinessGates"
PodTemplateSpecFieldRestartPolicy = "restartPolicy"
PodTemplateSpecFieldRunAsGroup = "runAsGroup"
PodTemplateSpecFieldRunAsNonRoot = "runAsNonRoot"
PodTemplateSpecFieldRuntimeClassName = "runtimeClassName"
PodTemplateSpecFieldSchedulerName = "schedulerName"
PodTemplateSpecFieldScheduling = "scheduling"
PodTemplateSpecFieldServiceAccountName = "serviceAccountName"
PodTemplateSpecFieldShareProcessNamespace = "shareProcessNamespace"
PodTemplateSpecFieldSubdomain = "subdomain"
PodTemplateSpecFieldSysctls = "sysctls"
PodTemplateSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
PodTemplateSpecFieldUid = "uid"
PodTemplateSpecFieldVolumes = "volumes"
@ -50,14 +53,17 @@ type PodTemplateSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -31,12 +31,14 @@ const (
ReplicaSetFieldPriorityClassName = "priorityClassName"
ReplicaSetFieldProjectID = "projectId"
ReplicaSetFieldPublicEndpoints = "publicEndpoints"
ReplicaSetFieldReadinessGates = "readinessGates"
ReplicaSetFieldRemoved = "removed"
ReplicaSetFieldReplicaSetConfig = "replicaSetConfig"
ReplicaSetFieldReplicaSetStatus = "replicaSetStatus"
ReplicaSetFieldRestartPolicy = "restartPolicy"
ReplicaSetFieldRunAsGroup = "runAsGroup"
ReplicaSetFieldRunAsNonRoot = "runAsNonRoot"
ReplicaSetFieldRuntimeClassName = "runtimeClassName"
ReplicaSetFieldScale = "scale"
ReplicaSetFieldSchedulerName = "schedulerName"
ReplicaSetFieldScheduling = "scheduling"
@ -45,6 +47,7 @@ const (
ReplicaSetFieldShareProcessNamespace = "shareProcessNamespace"
ReplicaSetFieldState = "state"
ReplicaSetFieldSubdomain = "subdomain"
ReplicaSetFieldSysctls = "sysctls"
ReplicaSetFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
ReplicaSetFieldTransitioning = "transitioning"
ReplicaSetFieldTransitioningMessage = "transitioningMessage"
@ -82,12 +85,14 @@ type ReplicaSet struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
ReplicaSetConfig *ReplicaSetConfig `json:"replicaSetConfig,omitempty" yaml:"replicaSetConfig,omitempty"`
ReplicaSetStatus *ReplicaSetStatus `json:"replicaSetStatus,omitempty" yaml:"replicaSetStatus,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -96,6 +101,7 @@ type ReplicaSet struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -31,12 +31,14 @@ const (
ReplicationControllerFieldPriorityClassName = "priorityClassName"
ReplicationControllerFieldProjectID = "projectId"
ReplicationControllerFieldPublicEndpoints = "publicEndpoints"
ReplicationControllerFieldReadinessGates = "readinessGates"
ReplicationControllerFieldRemoved = "removed"
ReplicationControllerFieldReplicationControllerConfig = "replicationControllerConfig"
ReplicationControllerFieldReplicationControllerStatus = "replicationControllerStatus"
ReplicationControllerFieldRestartPolicy = "restartPolicy"
ReplicationControllerFieldRunAsGroup = "runAsGroup"
ReplicationControllerFieldRunAsNonRoot = "runAsNonRoot"
ReplicationControllerFieldRuntimeClassName = "runtimeClassName"
ReplicationControllerFieldScale = "scale"
ReplicationControllerFieldSchedulerName = "schedulerName"
ReplicationControllerFieldScheduling = "scheduling"
@ -45,6 +47,7 @@ const (
ReplicationControllerFieldShareProcessNamespace = "shareProcessNamespace"
ReplicationControllerFieldState = "state"
ReplicationControllerFieldSubdomain = "subdomain"
ReplicationControllerFieldSysctls = "sysctls"
ReplicationControllerFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
ReplicationControllerFieldTransitioning = "transitioning"
ReplicationControllerFieldTransitioningMessage = "transitioningMessage"
@ -82,12 +85,14 @@ type ReplicationController struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
ReplicationControllerConfig *ReplicationControllerConfig `json:"replicationControllerConfig,omitempty" yaml:"replicationControllerConfig,omitempty"`
ReplicationControllerStatus *ReplicationControllerStatus `json:"replicationControllerStatus,omitempty" yaml:"replicationControllerStatus,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -96,6 +101,7 @@ type ReplicationController struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
State string `json:"state,omitempty" yaml:"state,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -19,10 +19,12 @@ const (
ReplicationControllerSpecFieldObjectMeta = "metadata"
ReplicationControllerSpecFieldPriority = "priority"
ReplicationControllerSpecFieldPriorityClassName = "priorityClassName"
ReplicationControllerSpecFieldReadinessGates = "readinessGates"
ReplicationControllerSpecFieldReplicationControllerConfig = "replicationControllerConfig"
ReplicationControllerSpecFieldRestartPolicy = "restartPolicy"
ReplicationControllerSpecFieldRunAsGroup = "runAsGroup"
ReplicationControllerSpecFieldRunAsNonRoot = "runAsNonRoot"
ReplicationControllerSpecFieldRuntimeClassName = "runtimeClassName"
ReplicationControllerSpecFieldScale = "scale"
ReplicationControllerSpecFieldSchedulerName = "schedulerName"
ReplicationControllerSpecFieldScheduling = "scheduling"
@ -30,6 +32,7 @@ const (
ReplicationControllerSpecFieldServiceAccountName = "serviceAccountName"
ReplicationControllerSpecFieldShareProcessNamespace = "shareProcessNamespace"
ReplicationControllerSpecFieldSubdomain = "subdomain"
ReplicationControllerSpecFieldSysctls = "sysctls"
ReplicationControllerSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
ReplicationControllerSpecFieldUid = "uid"
ReplicationControllerSpecFieldVolumes = "volumes"
@ -53,10 +56,12 @@ type ReplicationControllerSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
ReplicationControllerConfig *ReplicationControllerConfig `json:"replicationControllerConfig,omitempty" yaml:"replicationControllerConfig,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -64,6 +69,7 @@ type ReplicationControllerSpec struct {
ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -6,6 +6,7 @@ const (
SecurityContextFieldCapAdd = "capAdd"
SecurityContextFieldCapDrop = "capDrop"
SecurityContextFieldPrivileged = "privileged"
SecurityContextFieldProcMount = "procMount"
SecurityContextFieldReadOnly = "readOnly"
SecurityContextFieldRunAsGroup = "runAsGroup"
SecurityContextFieldRunAsNonRoot = "runAsNonRoot"
@ -17,6 +18,7 @@ type SecurityContext struct {
CapAdd []string `json:"capAdd,omitempty" yaml:"capAdd,omitempty"`
CapDrop []string `json:"capDrop,omitempty" yaml:"capDrop,omitempty"`
Privileged *bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
ProcMount string `json:"procMount,omitempty" yaml:"procMount,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`

View File

@ -0,0 +1,14 @@
package client
const (
ServiceAccountTokenProjectionType = "serviceAccountTokenProjection"
ServiceAccountTokenProjectionFieldAudience = "audience"
ServiceAccountTokenProjectionFieldExpirationSeconds = "expirationSeconds"
ServiceAccountTokenProjectionFieldPath = "path"
)
type ServiceAccountTokenProjection struct {
Audience string `json:"audience,omitempty" yaml:"audience,omitempty"`
ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" yaml:"expirationSeconds,omitempty"`
Path string `json:"path,omitempty" yaml:"path,omitempty"`
}

View File

@ -31,10 +31,12 @@ const (
StatefulSetFieldPriorityClassName = "priorityClassName"
StatefulSetFieldProjectID = "projectId"
StatefulSetFieldPublicEndpoints = "publicEndpoints"
StatefulSetFieldReadinessGates = "readinessGates"
StatefulSetFieldRemoved = "removed"
StatefulSetFieldRestartPolicy = "restartPolicy"
StatefulSetFieldRunAsGroup = "runAsGroup"
StatefulSetFieldRunAsNonRoot = "runAsNonRoot"
StatefulSetFieldRuntimeClassName = "runtimeClassName"
StatefulSetFieldScale = "scale"
StatefulSetFieldSchedulerName = "schedulerName"
StatefulSetFieldScheduling = "scheduling"
@ -45,6 +47,7 @@ const (
StatefulSetFieldStatefulSetConfig = "statefulSetConfig"
StatefulSetFieldStatefulSetStatus = "statefulSetStatus"
StatefulSetFieldSubdomain = "subdomain"
StatefulSetFieldSysctls = "sysctls"
StatefulSetFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
StatefulSetFieldTransitioning = "transitioning"
StatefulSetFieldTransitioningMessage = "transitioningMessage"
@ -82,10 +85,12 @@ type StatefulSet struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -96,6 +101,7 @@ type StatefulSet struct {
StatefulSetConfig *StatefulSetConfig `json:"statefulSetConfig,omitempty" yaml:"statefulSetConfig,omitempty"`
StatefulSetStatus *StatefulSetStatus `json:"statefulSetStatus,omitempty" yaml:"statefulSetStatus,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -19,9 +19,11 @@ const (
StatefulSetSpecFieldObjectMeta = "metadata"
StatefulSetSpecFieldPriority = "priority"
StatefulSetSpecFieldPriorityClassName = "priorityClassName"
StatefulSetSpecFieldReadinessGates = "readinessGates"
StatefulSetSpecFieldRestartPolicy = "restartPolicy"
StatefulSetSpecFieldRunAsGroup = "runAsGroup"
StatefulSetSpecFieldRunAsNonRoot = "runAsNonRoot"
StatefulSetSpecFieldRuntimeClassName = "runtimeClassName"
StatefulSetSpecFieldScale = "scale"
StatefulSetSpecFieldSchedulerName = "schedulerName"
StatefulSetSpecFieldScheduling = "scheduling"
@ -30,6 +32,7 @@ const (
StatefulSetSpecFieldShareProcessNamespace = "shareProcessNamespace"
StatefulSetSpecFieldStatefulSetConfig = "statefulSetConfig"
StatefulSetSpecFieldSubdomain = "subdomain"
StatefulSetSpecFieldSysctls = "sysctls"
StatefulSetSpecFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
StatefulSetSpecFieldUid = "uid"
StatefulSetSpecFieldVolumes = "volumes"
@ -53,9 +56,11 @@ type StatefulSetSpec struct {
ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Priority *int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -64,6 +69,7 @@ type StatefulSetSpec struct {
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" yaml:"shareProcessNamespace,omitempty"`
StatefulSetConfig *StatefulSetConfig `json:"statefulSetConfig,omitempty" yaml:"statefulSetConfig,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Uid *int64 `json:"uid,omitempty" yaml:"uid,omitempty"`
Volumes []Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"`

View File

@ -0,0 +1,12 @@
package client
const (
SysctlType = "sysctl"
SysctlFieldName = "name"
SysctlFieldValue = "value"
)
type Sysctl struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Value string `json:"value,omitempty" yaml:"value,omitempty"`
}

View File

@ -0,0 +1,14 @@
package client
const (
TypedLocalObjectReferenceType = "typedLocalObjectReference"
TypedLocalObjectReferenceFieldAPIGroup = "apiGroup"
TypedLocalObjectReferenceFieldKind = "kind"
TypedLocalObjectReferenceFieldName = "name"
)
type TypedLocalObjectReference struct {
APIGroup string `json:"apiGroup,omitempty" yaml:"apiGroup,omitempty"`
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

View File

@ -1,14 +1,16 @@
package client
const (
VolumeProjectionType = "volumeProjection"
VolumeProjectionFieldConfigMap = "configMap"
VolumeProjectionFieldDownwardAPI = "downwardAPI"
VolumeProjectionFieldSecret = "secret"
VolumeProjectionType = "volumeProjection"
VolumeProjectionFieldConfigMap = "configMap"
VolumeProjectionFieldDownwardAPI = "downwardAPI"
VolumeProjectionFieldSecret = "secret"
VolumeProjectionFieldServiceAccountToken = "serviceAccountToken"
)
type VolumeProjection struct {
ConfigMap *ConfigMapProjection `json:"configMap,omitempty" yaml:"configMap,omitempty"`
DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" yaml:"downwardAPI,omitempty"`
Secret *SecretProjection `json:"secret,omitempty" yaml:"secret,omitempty"`
ConfigMap *ConfigMapProjection `json:"configMap,omitempty" yaml:"configMap,omitempty"`
DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" yaml:"downwardAPI,omitempty"`
Secret *SecretProjection `json:"secret,omitempty" yaml:"secret,omitempty"`
ServiceAccountToken *ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty" yaml:"serviceAccountToken,omitempty"`
}

View File

@ -40,6 +40,7 @@ const (
WorkloadFieldPriorityClassName = "priorityClassName"
WorkloadFieldProjectID = "projectId"
WorkloadFieldPublicEndpoints = "publicEndpoints"
WorkloadFieldReadinessGates = "readinessGates"
WorkloadFieldRemoved = "removed"
WorkloadFieldReplicaSetConfig = "replicaSetConfig"
WorkloadFieldReplicaSetStatus = "replicaSetStatus"
@ -48,6 +49,7 @@ const (
WorkloadFieldRestartPolicy = "restartPolicy"
WorkloadFieldRunAsGroup = "runAsGroup"
WorkloadFieldRunAsNonRoot = "runAsNonRoot"
WorkloadFieldRuntimeClassName = "runtimeClassName"
WorkloadFieldScale = "scale"
WorkloadFieldSchedulerName = "schedulerName"
WorkloadFieldScheduling = "scheduling"
@ -58,6 +60,8 @@ const (
WorkloadFieldStatefulSetConfig = "statefulSetConfig"
WorkloadFieldStatefulSetStatus = "statefulSetStatus"
WorkloadFieldSubdomain = "subdomain"
WorkloadFieldSysctls = "sysctls"
WorkloadFieldTTLSecondsAfterFinished = "ttlSecondsAfterFinished"
WorkloadFieldTerminationGracePeriodSeconds = "terminationGracePeriodSeconds"
WorkloadFieldTransitioning = "transitioning"
WorkloadFieldTransitioningMessage = "transitioningMessage"
@ -104,6 +108,7 @@ type Workload struct {
PriorityClassName string `json:"priorityClassName,omitempty" yaml:"priorityClassName,omitempty"`
ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"`
PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"`
ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" yaml:"readinessGates,omitempty"`
Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
ReplicaSetConfig *ReplicaSetConfig `json:"replicaSetConfig,omitempty" yaml:"replicaSetConfig,omitempty"`
ReplicaSetStatus *ReplicaSetStatus `json:"replicaSetStatus,omitempty" yaml:"replicaSetStatus,omitempty"`
@ -112,6 +117,7 @@ type Workload struct {
RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"`
RunAsGroup *int64 `json:"runAsGroup,omitempty" yaml:"runAsGroup,omitempty"`
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty" yaml:"runAsNonRoot,omitempty"`
RuntimeClassName string `json:"runtimeClassName,omitempty" yaml:"runtimeClassName,omitempty"`
Scale *int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
SchedulerName string `json:"schedulerName,omitempty" yaml:"schedulerName,omitempty"`
Scheduling *Scheduling `json:"scheduling,omitempty" yaml:"scheduling,omitempty"`
@ -122,6 +128,8 @@ type Workload struct {
StatefulSetConfig *StatefulSetConfig `json:"statefulSetConfig,omitempty" yaml:"statefulSetConfig,omitempty"`
StatefulSetStatus *StatefulSetStatus `json:"statefulSetStatus,omitempty" yaml:"statefulSetStatus,omitempty"`
Subdomain string `json:"subdomain,omitempty" yaml:"subdomain,omitempty"`
Sysctls []Sysctl `json:"sysctls,omitempty" yaml:"sysctls,omitempty"`
TTLSecondsAfterFinished *int64 `json:"ttlSecondsAfterFinished,omitempty" yaml:"ttlSecondsAfterFinished,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty" yaml:"terminationGracePeriodSeconds,omitempty"`
Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"`

View File

@ -4,7 +4,6 @@ import (
"context"
"github.com/rancher/norman/controller"
"github.com/rancher/norman/event"
"github.com/rancher/norman/objectclient/dynamic"
"github.com/rancher/norman/restwatch"
"github.com/rancher/norman/signal"
@ -26,13 +25,10 @@ import (
"github.com/rancher/types/peermanager"
"github.com/rancher/types/user"
"github.com/sirupsen/logrus"
"k8s.io/api/core/v1"
"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes"
typedcorev1 "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/record"
)
var (
@ -143,16 +139,12 @@ func (c *ScaledContext) Start(ctx context.Context) error {
}
type ManagementContext struct {
eventBroadcaster record.EventBroadcaster
ClientGetter proxy.ClientGetter
LocalConfig *rest.Config
RESTConfig rest.Config
UnversionedClient rest.Interface
K8sClient kubernetes.Interface
APIExtClient clientset.Interface
Events record.EventRecorder
EventLogger event.Logger
Schemas *types.Schemas
Scheme *runtime.Scheme
Dialer dialer.Factory
@ -310,27 +302,12 @@ func NewManagementContext(config rest.Config) (*ManagementContext, error) {
managementv3.AddToScheme(context.Scheme)
projectv3.AddToScheme(context.Scheme)
context.eventBroadcaster = record.NewBroadcaster()
context.Events = context.eventBroadcaster.NewRecorder(context.Scheme, v1.EventSource{
Component: "CattleManagementServer",
})
context.EventLogger = event.NewLogger(context.Events)
return context, err
}
func (c *ManagementContext) Start(ctx context.Context) error {
logrus.Info("Starting management controllers")
watcher := c.eventBroadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{
Interface: c.K8sClient.CoreV1().Events(""),
})
go func() {
<-ctx.Done()
watcher.Stop()
}()
return controller.SyncThenStart(ctx, 50, c.controllers()...)
}

View File

@ -5,7 +5,6 @@ import "net"
type Dialer func(network, address string) (net.Conn, error)
type Factory interface {
LocalClusterDialer() Dialer
ClusterDialer(clusterName string) (Dialer, error)
DockerDialer(clusterName, machineName string) (Dialer, error)
NodeDialer(clusterName, machineName string) (Dialer, error)

12
go.mod
View File

@ -1,12 +0,0 @@
module github.com/rancher/types
require (
github.com/pkg/errors v0.8.0
github.com/rancher/norman v0.0.0-20181010023203-ad4865987ce7
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2
k8s.io/api v0.0.0-20180621150657-6c0bbc3e58fa
k8s.io/apiextensions-apiserver v0.0.0-20180621165922-80db67131e8d
k8s.io/apimachinery v0.0.0-20180619225948-e386b2658ed2
k8s.io/client-go v2.0.0-alpha.0.0.20180621152933-b0722d92a7c1+incompatible
k8s.io/gengo v0.0.0-20180223161844-01a732e01d00
)

103
go.sum
View File

@ -1,103 +0,0 @@
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/davecgh/go-spew v1.1.1-0.20170626231645-782f4967f2dc h1:NlbIJbqL8zjb55Vdrsr5uqyVC6/NoUUd2YrLojfE2zI=
github.com/davecgh/go-spew v1.1.1-0.20170626231645-782f4967f2dc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 h1:ZktWZesgun21uEDrwW7iEV1zPCGQldM2atlJZ3TdvVM=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e h1:ago6fNuQ6IhszPsXkeU7qRCyfsIX7L67WDybsAPkLl8=
github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20141105023935-44145f04b68c h1:CbdkBQ1/PiAo0FYJhQGwASD8wrgNvTdf01g6+O9tNuA=
github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54 h1:nRNJXiJvemchkOTn0V4U11TZkvacB94gTzbTZbSA7Rw=
github.com/golang/protobuf v0.0.0-20171021043952-1643683e1b54/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367 h1:ScAXWS+TR6MZKex+7Z8rneuSJH+FSDqd6ocQyl+ZHo4=
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/gorilla/websocket v0.0.0-20150714140627-6eb6ad425a89 h1:f3M+RTnIGEhCF8ynRezzgqxlQ+VBfer6kL61+4/W+v4=
github.com/gorilla/websocket v0.0.0-20150714140627-6eb6ad425a89/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880 h1:OaRuzt9oCKNui8cCskZijoKUwe+aCuuCwvx1ox8FNyw=
github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs=
github.com/imdario/mergo v0.0.0-20141206190957-6633656539c1/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3 h1:/UewZcckqhvnnS0C6r3Sher2hSEbVmM6Ogpcjen08+Y=
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/kr/pretty v0.0.0-20140812000539-f31442d60e51 h1:kGEU5h0EzkNa+B8Q3e0GlaIocJYB1G6ZpefcceXhfgc=
github.com/kr/pretty v0.0.0-20140812000539-f31442d60e51/go.mod h1:Bvhd+E3laJ0AVkG0c9rmtZcnhV0HQ3+c3YxxqTvc/gA=
github.com/kr/text v0.0.0-20130911015532-6807e777504f h1:JaNmHIV9Eby6srQVWuiQ6n8ko2o/lG6udSRCbFZe1fs=
github.com/kr/text v0.0.0-20130911015532-6807e777504f/go.mod h1:sjUstKUATFIcff4qlB53Kml0wQPtJVc/3fWrmuUmcfA=
github.com/maruel/panicparse v1.1.1/go.mod h1:nty42YY5QByNC5MM7q/nj938VbgPU7avs45z6NClpxI=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da h1:ZQGIPjr1iTtUPXZFk8WShqb5G+Qg65VHFLtSvmHh+Mw=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/onsi/ginkgo v1.2.1-0.20170318221715-67b9df7f55fe h1:d3gNxYlRvgsR9X/YxcYc0e0wsFAhC6u5zM51TC+o+EA=
github.com/onsi/ginkgo v1.2.1-0.20170318221715-67b9df7f55fe/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20160911051023-d59fa0ac68bb h1:myDTJUQm/UVMeOHuw47rGP+3Id5b0s0T7EVl71ZweuI=
github.com/onsi/gomega v0.0.0-20160911051023-d59fa0ac68bb/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0 h1:GD+A8+e+wFkqje55/2fOVnZPkoDIu1VooBWfNrnY8Uo=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8=
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e h1:n/3MEhJQjQxrOUCzh1Y3Re6aJUUWRp2M9+Oc3eVn/54=
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/procfs v0.0.0-20180920065004-418d78d0b9a7 h1:NgR6WN8nQ4SmFC1sSUHY8SriLuWCZ6cCIQtH4vDZN3c=
github.com/prometheus/procfs v0.0.0-20180920065004-418d78d0b9a7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/rancher/norman v0.0.0-20180925184916-d675dc79491f h1:HFqoOtSaJM2IV0W0MeqvmA0GUyWlO1AKQZm14K4GN8M=
github.com/rancher/norman v0.0.0-20180925184916-d675dc79491f/go.mod h1:RG+lnsTkAH0hpXtWUsBSmrgPrPccC2z6d7M1m/grjO0=
github.com/rancher/norman v0.0.0-20181010023203-ad4865987ce7 h1:sLQZP5VDqDjctHvTsxMsfrtACC+eooWOySuWgLd6q/8=
github.com/rancher/norman v0.0.0-20181010023203-ad4865987ce7/go.mod h1:hIlaLlQ+ZVmTY/Hv+JBmxKLhJzOpHbG2IhaWOkHaSBs=
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2 h1:a07zp0wovcAE2jH+wlD22JLqUH6Rdl8Aon+NiyPxE+0=
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/testify v1.1.5-0.20170601210322-f6abca593680 h1:oAXco1Ts88F75L1qvG3BAa4ChXI3EZDfxbB+p+y8+gE=
github.com/stretchr/testify v1.1.5-0.20170601210322-f6abca593680/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/crypto v0.0.0-20170825220121-81e90905daef h1:R8ubLIilYRXIXpgjOg2l/ECVs3HzVKIjJEhxSsQ91u4=
golang.org/x/crypto v0.0.0-20170825220121-81e90905daef/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20170809000501-1c05540f6879 h1:0rFa7EaCGdQPmZVbo9F7MNF65b8dyzS6EUnXjs9Cllk=
golang.org/x/net v0.0.0-20170809000501-1c05540f6879/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20171031081856-95c657629925 h1:nCH33NboKIsT4HoXBsXTWX8ul303HxWgkc5s2Ezwacg=
golang.org/x/sys v0.0.0-20171031081856-95c657629925/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.0.0-20170810154203-b19bf474d317 h1:WKW+OPdYPlvOTVGHuMfjnIC6yY2SI93yFB0pZ7giBmQ=
golang.org/x/text v0.0.0-20170810154203-b19bf474d317/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d h1:TnM+PKb3ylGmZvyPXmo9m/wktg7Jn/a/fNmr33HSj8g=
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20170428054726-2382e3994d48 h1:Al/HKLBwsMBsWhxa71LOWO8MeCbD21L+x5rHb83JHjI=
golang.org/x/tools v0.0.0-20170428054726-2382e3994d48/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o=
gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
gopkg.in/yaml.v2 v2.0.0-20170721113624-670d4cfef054 h1:ROF+R/wHHruzF40n5DfPv2jwm7rCJwvs8fz+RTZWjLE=
gopkg.in/yaml.v2 v2.0.0-20170721113624-670d4cfef054/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
k8s.io/api v0.0.0-20180621150657-6c0bbc3e58fa h1:FdiZyyrmQXY7AWCNUfAJrx9UCjMF/oBNZP8CmKoc2aU=
k8s.io/api v0.0.0-20180621150657-6c0bbc3e58fa/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/apiextensions-apiserver v0.0.0-20180621165922-80db67131e8d h1:QYxqxjF8LG0fEp4lhpDj4zGXaO1EAbt97/3vqVL0dpk=
k8s.io/apiextensions-apiserver v0.0.0-20180621165922-80db67131e8d/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE=
k8s.io/apimachinery v0.0.0-20180619225948-e386b2658ed2 h1:NJEj7o7SKxpURej3uJ1QZJZCeRlRj21EatnCK65nrB4=
k8s.io/apimachinery v0.0.0-20180619225948-e386b2658ed2/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
k8s.io/client-go v2.0.0-alpha.0.0.20180621152933-b0722d92a7c1+incompatible h1:lph8g2o3QoQdw5W+fKHD/+Td4MEN2dmXgAjoOH5aISo=
k8s.io/client-go v2.0.0-alpha.0.0.20180621152933-b0722d92a7c1+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
k8s.io/gengo v0.0.0-20180223161844-01a732e01d00 h1:vt4Sh/+HFnLoTScgFLNoMjNqOg0sQgAzViarcz+UX3Q=
k8s.io/gengo v0.0.0-20180223161844-01a732e01d00/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/kube-openapi v0.0.0-20180509051136-39cb288412c4 h1:gW+EUB2I96nbxVenV/8ctfbACsHP+yxlT2dhMCsiy+s=
k8s.io/kube-openapi v0.0.0-20180509051136-39cb288412c4/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
k8s.io/kubernetes v1.10.5/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=

5
vendor.conf Normal file
View File

@ -0,0 +1,5 @@
# package
github.com/rancher/types
github.com/pkg/errors v0.8.0
github.com/rancher/norman 4c3df5a3de57701e5ff57e13b45a3b219b5d9d33 transitive=true

2
vendor/github.com/beorn7/perks/.gitignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
*.test
*.prof

31
vendor/github.com/beorn7/perks/README.md generated vendored Normal file
View File

@ -0,0 +1,31 @@
# Perks for Go (golang.org)
Perks contains the Go package quantile that computes approximate quantiles over
an unbounded data stream within low memory and CPU bounds.
For more information and examples, see:
http://godoc.org/github.com/bmizerany/perks
A very special thank you and shout out to Graham Cormode (Rutgers University),
Flip Korn (AT&T LabsResearch), S. Muthukrishnan (Rutgers University), and
Divesh Srivastava (AT&T LabsResearch) for their research and publication of
[Effective Computation of Biased Quantiles over Data Streams](http://www.cs.rutgers.edu/~muthu/bquant.pdf)
Thank you, also:
* Armon Dadgar (@armon)
* Andrew Gerrand (@nf)
* Brad Fitzpatrick (@bradfitz)
* Keith Rarick (@kr)
FAQ:
Q: Why not move the quantile package into the project root?
A: I want to add more packages to perks later.
Copyright (C) 2013 Blake Mizerany
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -77,20 +77,15 @@ func NewHighBiased(epsilon float64) *Stream {
// is guaranteed to be within (Quantile±Epsilon).
//
// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties.
func NewTargeted(targetMap map[float64]float64) *Stream {
// Convert map to slice to avoid slow iterations on a map.
// ƒ is called on the hot path, so converting the map to a slice
// beforehand results in significant CPU savings.
targets := targetMapToSlice(targetMap)
func NewTargeted(targets map[float64]float64) *Stream {
ƒ := func(s *stream, r float64) float64 {
var m = math.MaxFloat64
var f float64
for _, t := range targets {
if t.quantile*s.n <= r {
f = (2 * t.epsilon * r) / t.quantile
for quantile, epsilon := range targets {
if quantile*s.n <= r {
f = (2 * epsilon * r) / quantile
} else {
f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile)
f = (2 * epsilon * (s.n - r)) / (1 - quantile)
}
if f < m {
m = f
@ -101,25 +96,6 @@ func NewTargeted(targetMap map[float64]float64) *Stream {
return newStream(ƒ)
}
type target struct {
quantile float64
epsilon float64
}
func targetMapToSlice(targetMap map[float64]float64) []target {
targets := make([]target, 0, len(targetMap))
for quantile, epsilon := range targetMap {
t := target{
quantile: quantile,
epsilon: epsilon,
}
targets = append(targets, t)
}
return targets
}
// Stream computes quantiles for a stream of float64s. It is not thread-safe by
// design. Take care when using across multiple goroutines.
type Stream struct {
@ -157,7 +133,7 @@ func (s *Stream) Query(q float64) float64 {
if l == 0 {
return 0
}
i := int(math.Ceil(float64(l) * q))
i := int(float64(l) * q)
if i > 0 {
i -= 1
}

22
vendor/github.com/davecgh/go-spew/.gitignore generated vendored Normal file
View File

@ -0,0 +1,22 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe

14
vendor/github.com/davecgh/go-spew/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,14 @@
language: go
go:
- 1.5.4
- 1.6.3
- 1.7
install:
- go get -v golang.org/x/tools/cmd/cover
script:
- go test -v -tags=safe ./spew
- go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov
after_success:
- go get -v github.com/mattn/goveralls
- export PATH=$PATH:$HOME/gopath/bin
- goveralls -coverprofile=profile.cov -service=travis-ci

205
vendor/github.com/davecgh/go-spew/README.md generated vendored Normal file
View File

@ -0,0 +1,205 @@
go-spew
=======
[![Build Status](https://img.shields.io/travis/davecgh/go-spew.svg)]
(https://travis-ci.org/davecgh/go-spew) [![ISC License]
(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) [![Coverage Status]
(https://img.shields.io/coveralls/davecgh/go-spew.svg)]
(https://coveralls.io/r/davecgh/go-spew?branch=master)
Go-spew implements a deep pretty printer for Go data structures to aid in
debugging. A comprehensive suite of tests with 100% test coverage is provided
to ensure proper functionality. See `test_coverage.txt` for the gocov coverage
report. Go-spew is licensed under the liberal ISC license, so it may be used in
open source or commercial projects.
If you're interested in reading about how this package came to life and some
of the challenges involved in providing a deep pretty printer, there is a blog
post about it
[here](https://web.archive.org/web/20160304013555/https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/).
## Documentation
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)]
(http://godoc.org/github.com/davecgh/go-spew/spew)
Full `go doc` style documentation for the project can be viewed online without
installing this package by using the excellent GoDoc site here:
http://godoc.org/github.com/davecgh/go-spew/spew
You can also view the documentation locally once the package is installed with
the `godoc` tool by running `godoc -http=":6060"` and pointing your browser to
http://localhost:6060/pkg/github.com/davecgh/go-spew/spew
## Installation
```bash
$ go get -u github.com/davecgh/go-spew/spew
```
## Quick Start
Add this import line to the file you're working in:
```Go
import "github.com/davecgh/go-spew/spew"
```
To dump a variable with full newlines, indentation, type, and pointer
information use Dump, Fdump, or Sdump:
```Go
spew.Dump(myVar1, myVar2, ...)
spew.Fdump(someWriter, myVar1, myVar2, ...)
str := spew.Sdump(myVar1, myVar2, ...)
```
Alternatively, if you would prefer to use format strings with a compacted inline
printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most
compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types
and pointer addresses):
```Go
spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2)
spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2)
spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4)
```
## Debugging a Web Application Example
Here is an example of how you can use `spew.Sdump()` to help debug a web application. Please be sure to wrap your output using the `html.EscapeString()` function for safety reasons. You should also only use this debugging technique in a development environment, never in production.
```Go
package main
import (
"fmt"
"html"
"net/http"
"github.com/davecgh/go-spew/spew"
)
func handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
fmt.Fprintf(w, "Hi there, %s!", r.URL.Path[1:])
fmt.Fprintf(w, "<!--\n" + html.EscapeString(spew.Sdump(w)) + "\n-->")
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}
```
## Sample Dump Output
```
(main.Foo) {
unexportedField: (*main.Bar)(0xf84002e210)({
flag: (main.Flag) flagTwo,
data: (uintptr) <nil>
}),
ExportedField: (map[interface {}]interface {}) {
(string) "one": (bool) true
}
}
([]uint8) {
00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... |
00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0|
00000020 31 32 |12|
}
```
## Sample Formatter Output
Double pointer to a uint8:
```
%v: <**>5
%+v: <**>(0xf8400420d0->0xf8400420c8)5
%#v: (**uint8)5
%#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5
```
Pointer to circular struct with a uint8 field and a pointer to itself:
```
%v: <*>{1 <*><shown>}
%+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)<shown>}
%#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)<shown>}
%#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)<shown>}
```
## Configuration Options
Configuration of spew is handled by fields in the ConfigState type. For
convenience, all of the top-level functions use a global state available via the
spew.Config global.
It is also possible to create a ConfigState instance that provides methods
equivalent to the top-level functions. This allows concurrent configuration
options. See the ConfigState documentation for more details.
```
* Indent
String to use for each indentation level for Dump functions.
It is a single space by default. A popular alternative is "\t".
* MaxDepth
Maximum number of levels to descend into nested data structures.
There is no limit by default.
* DisableMethods
Disables invocation of error and Stringer interface methods.
Method invocation is enabled by default.
* DisablePointerMethods
Disables invocation of error and Stringer interface methods on types
which only accept pointer receivers from non-pointer variables. This option
relies on access to the unsafe package, so it will not have any effect when
running in environments without access to the unsafe package such as Google
App Engine or with the "safe" build tag specified.
Pointer method invocation is enabled by default.
* DisablePointerAddresses
DisablePointerAddresses specifies whether to disable the printing of
pointer addresses. This is useful when diffing data structures in tests.
* DisableCapacities
DisableCapacities specifies whether to disable the printing of capacities
for arrays, slices, maps and channels. This is useful when diffing data
structures in tests.
* ContinueOnMethod
Enables recursion into types after invoking error and Stringer interface
methods. Recursion after method invocation is disabled by default.
* SortKeys
Specifies map keys should be sorted before being printed. Use
this to have a more deterministic, diffable output. Note that
only native types (bool, int, uint, floats, uintptr and string)
and types which implement error or Stringer interfaces are supported,
with other types sorted according to the reflect.Value.String() output
which guarantees display stability. Natural map order is used by
default.
* SpewKeys
SpewKeys specifies that, as a last resort attempt, map keys should be
spewed to strings and sorted by those strings. This is only considered
if SortKeys is true.
```
## Unsafe Package Dependency
This package relies on the unsafe package to perform some of the more advanced
features, however it also supports a "limited" mode which allows it to work in
environments where the unsafe package is not available. By default, it will
operate in this mode on Google App Engine and when compiled with GopherJS. The
"safe" build tag may also be specified to force the package to build without
using the unsafe package.
## License
Go-spew is licensed under the [copyfree](http://copyfree.org) ISC License.

22
vendor/github.com/davecgh/go-spew/cov_report.sh generated vendored Normal file
View File

@ -0,0 +1,22 @@
#!/bin/sh
# This script uses gocov to generate a test coverage report.
# The gocov tool my be obtained with the following command:
# go get github.com/axw/gocov/gocov
#
# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
# Check for gocov.
if ! type gocov >/dev/null 2>&1; then
echo >&2 "This script requires the gocov tool."
echo >&2 "You may obtain it with the following command:"
echo >&2 "go get github.com/axw/gocov/gocov"
exit 1
fi
# Only run the cgo tests if gcc is installed.
if type gcc >/dev/null 2>&1; then
(cd spew && gocov test -tags testcgo | gocov report)
else
(cd spew && gocov test | gocov report)
fi

61
vendor/github.com/davecgh/go-spew/test_coverage.txt generated vendored Normal file
View File

@ -0,0 +1,61 @@
github.com/davecgh/go-spew/spew/dump.go dumpState.dump 100.00% (88/88)
github.com/davecgh/go-spew/spew/format.go formatState.format 100.00% (82/82)
github.com/davecgh/go-spew/spew/format.go formatState.formatPtr 100.00% (52/52)
github.com/davecgh/go-spew/spew/dump.go dumpState.dumpPtr 100.00% (44/44)
github.com/davecgh/go-spew/spew/dump.go dumpState.dumpSlice 100.00% (39/39)
github.com/davecgh/go-spew/spew/common.go handleMethods 100.00% (30/30)
github.com/davecgh/go-spew/spew/common.go printHexPtr 100.00% (18/18)
github.com/davecgh/go-spew/spew/common.go unsafeReflectValue 100.00% (13/13)
github.com/davecgh/go-spew/spew/format.go formatState.constructOrigFormat 100.00% (12/12)
github.com/davecgh/go-spew/spew/dump.go fdump 100.00% (11/11)
github.com/davecgh/go-spew/spew/format.go formatState.Format 100.00% (11/11)
github.com/davecgh/go-spew/spew/common.go init 100.00% (10/10)
github.com/davecgh/go-spew/spew/common.go printComplex 100.00% (9/9)
github.com/davecgh/go-spew/spew/common.go valuesSorter.Less 100.00% (8/8)
github.com/davecgh/go-spew/spew/format.go formatState.buildDefaultFormat 100.00% (7/7)
github.com/davecgh/go-spew/spew/format.go formatState.unpackValue 100.00% (5/5)
github.com/davecgh/go-spew/spew/dump.go dumpState.indent 100.00% (4/4)
github.com/davecgh/go-spew/spew/common.go catchPanic 100.00% (4/4)
github.com/davecgh/go-spew/spew/config.go ConfigState.convertArgs 100.00% (4/4)
github.com/davecgh/go-spew/spew/spew.go convertArgs 100.00% (4/4)
github.com/davecgh/go-spew/spew/format.go newFormatter 100.00% (3/3)
github.com/davecgh/go-spew/spew/dump.go Sdump 100.00% (3/3)
github.com/davecgh/go-spew/spew/common.go printBool 100.00% (3/3)
github.com/davecgh/go-spew/spew/common.go sortValues 100.00% (3/3)
github.com/davecgh/go-spew/spew/config.go ConfigState.Sdump 100.00% (3/3)
github.com/davecgh/go-spew/spew/dump.go dumpState.unpackValue 100.00% (3/3)
github.com/davecgh/go-spew/spew/spew.go Printf 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Println 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Sprint 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Sprintf 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Sprintln 100.00% (1/1)
github.com/davecgh/go-spew/spew/common.go printFloat 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go NewDefaultConfig 100.00% (1/1)
github.com/davecgh/go-spew/spew/common.go printInt 100.00% (1/1)
github.com/davecgh/go-spew/spew/common.go printUint 100.00% (1/1)
github.com/davecgh/go-spew/spew/common.go valuesSorter.Len 100.00% (1/1)
github.com/davecgh/go-spew/spew/common.go valuesSorter.Swap 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Errorf 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Fprint 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintf 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Fprintln 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Print 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Printf 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Println 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Sprint 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintf 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Sprintln 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.NewFormatter 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Fdump 100.00% (1/1)
github.com/davecgh/go-spew/spew/config.go ConfigState.Dump 100.00% (1/1)
github.com/davecgh/go-spew/spew/dump.go Fdump 100.00% (1/1)
github.com/davecgh/go-spew/spew/dump.go Dump 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Fprintln 100.00% (1/1)
github.com/davecgh/go-spew/spew/format.go NewFormatter 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Errorf 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Fprint 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Fprintf 100.00% (1/1)
github.com/davecgh/go-spew/spew/spew.go Print 100.00% (1/1)
github.com/davecgh/go-spew/spew ------------------------------- 100.00% (505/505)

3
vendor/github.com/gogo/protobuf/.gitignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
._*
*.js
*.js.map

8
vendor/github.com/gogo/protobuf/.mailmap generated vendored Normal file
View File

@ -0,0 +1,8 @@
Walter Schulze <awalterschulze@gmail.com> Walter Schulze <walter@vastech.co.za>
Walter Schulze <awalterschulze@gmail.com> <walter@vastech.co.za>
Walter Schulze <awalterschulze@gmail.com> awalterschulze <awalterschulze@gmail.com>
Walter Schulze <awalterschulze@gmail.com> awalterschulze@gmail.com <awalterschulze@gmail.com>
John Tuley <john@tuley.org> <jtuley@pivotal.io>
Anton Povarov <anton.povarov@gmail.com> <antoxa@corp.badoo.com>
Denis Smirnov <denis.smirnov.91@gmail.com> dennwc
DongYun Kang <ceram1000@gmail.com> <ceram1000@gmail.com>

24
vendor/github.com/gogo/protobuf/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,24 @@
env:
- PROTOBUF_VERSION=2.6.1
- PROTOBUF_VERSION=3.0.2
- PROTOBUF_VERSION=3.2.0
before_install:
- ./install-protobuf.sh
- PATH=/home/travis/bin:$PATH protoc --version
script:
- PATH=/home/travis/bin:$PATH make buildserverall
- echo $TRAVIS_GO_VERSION
- if [ "$TRAVIS_GO_VERSION" == 1.8 ] && [[ "$PROTOBUF_VERSION" == 3.2.0 ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi
language: go
go:
- 1.6.3
- 1.7.1
- 1.8
matrix:
allow_failures:
- go: 1.6.3

5
vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS generated vendored Normal file
View File

@ -0,0 +1,5 @@
The contributors to the Go protobuf repository:
# This source code was written by the Go contributors.
# The master list of contributors is in the main Go distribution,
# visible at http://tip.golang.org/CONTRIBUTORS.

154
vendor/github.com/gogo/protobuf/Makefile generated vendored Normal file
View File

@ -0,0 +1,154 @@
# Protocol Buffers for Go with Gadgets
#
# Copyright (c) 2013, The GoGo Authors. All rights reserved.
# http://github.com/gogo/protobuf
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
GO_VERSION:=$(shell go version)
.PHONY: nuke regenerate tests clean install gofmt vet contributors
all: clean install regenerate install tests errcheck vet
buildserverall: clean install regenerate install tests vet js
install:
go install ./proto
go install ./gogoproto
go install ./jsonpb
go install ./protoc-gen-gogo
go install ./protoc-gen-gofast
go install ./protoc-gen-gogofast
go install ./protoc-gen-gogofaster
go install ./protoc-gen-gogoslick
go install ./protoc-gen-gostring
go install ./protoc-min-version
go install ./protoc-gen-combo
go install ./gogoreplace
clean:
go clean ./...
nuke:
go clean -i ./...
gofmt:
gofmt -l -s -w .
regenerate:
make -C protoc-gen-gogo/descriptor regenerate
make -C protoc-gen-gogo/plugin regenerate
make -C protoc-gen-gogo/testdata regenerate
make -C gogoproto regenerate
make -C proto/testdata regenerate
make -C jsonpb/jsonpb_test_proto regenerate
make -C _conformance regenerate
make -C types regenerate
make -C test regenerate
make -C test/example regenerate
make -C test/unrecognized regenerate
make -C test/group regenerate
make -C test/unrecognizedgroup regenerate
make -C test/enumstringer regenerate
make -C test/unmarshalmerge regenerate
make -C test/moredefaults regenerate
make -C test/issue8 regenerate
make -C test/enumprefix regenerate
make -C test/enumcustomname regenerate
make -C test/packed regenerate
make -C test/protosize regenerate
make -C test/tags regenerate
make -C test/oneof regenerate
make -C test/oneof3 regenerate
make -C test/theproto3 regenerate
make -C test/mapsproto2 regenerate
make -C test/issue42order regenerate
make -C proto generate-test-pbs
make -C test/importdedup regenerate
make -C test/custombytesnonstruct regenerate
make -C test/required regenerate
make -C test/casttype regenerate
make -C test/castvalue regenerate
make -C vanity/test regenerate
make -C test/sizeunderscore regenerate
make -C test/issue34 regenerate
make -C test/empty-issue70 regenerate
make -C test/indeximport-issue72 regenerate
make -C test/fuzztests regenerate
make -C test/oneofembed regenerate
make -C test/asymetric-issue125 regenerate
make -C test/filedotname regenerate
make -C test/nopackage regenerate
make -C test/types regenerate
make -C test/proto3extension regenerate
make -C test/stdtypes regenerate
make -C test/data regenerate
make -C test/typedecl regenerate
make -C test/issue260 regenerate
make -C test/issue261 regenerate
make -C test/issue262 regenerate
make -C test/enumdecl regenerate
make -C test/typedecl_all regenerate
make -C test/enumdecl_all regenerate
make gofmt
tests:
go build ./test/enumprefix
go test ./...
vet:
go vet ./...
go tool vet --shadow .
errcheck:
go get github.com/kisielk/errcheck
errcheck ./test/...
drone:
sudo apt-get install protobuf-compiler
(cd $(GOPATH)/src/github.com/gogo/protobuf && make buildserverall)
testall:
go get -u github.com/golang/protobuf/proto
make -C protoc-gen-gogo/testdata test
make -C vanity/test test
make -C test/registration test
make tests
bench:
(cd test/mixbench && go build .)
(cd test/mixbench && ./mixbench)
contributors:
git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS
js:
ifeq (go1.8, $(findstring go1.8, $(GO_VERSION)))
go get github.com/gopherjs/gopherjs
gopherjs build github.com/gogo/protobuf/protoc-gen-gogo
endif
update:
(cd protobuf && make update)

258
vendor/github.com/gogo/protobuf/README generated vendored Normal file
View File

@ -0,0 +1,258 @@
GoGoProtobuf http://github.com/gogo/protobuf extends
GoProtobuf http://github.com/golang/protobuf
# Go support for Protocol Buffers
Google's data interchange format.
Copyright 2010 The Go Authors.
https://github.com/golang/protobuf
This package and the code it generates requires at least Go 1.4.
This software implements Go bindings for protocol buffers. For
information about protocol buffers themselves, see
https://developers.google.com/protocol-buffers/
## Installation ##
To use this software, you must:
- Install the standard C++ implementation of protocol buffers from
https://developers.google.com/protocol-buffers/
- Of course, install the Go compiler and tools from
https://golang.org/
See
https://golang.org/doc/install
for details or, if you are using gccgo, follow the instructions at
https://golang.org/doc/install/gccgo
- Grab the code from the repository and install the proto package.
The simplest way is to run `go get -u github.com/golang/protobuf/{proto,protoc-gen-go}`.
The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
compiler, protoc, to find it.
This software has two parts: a 'protocol compiler plugin' that
generates Go source files that, once compiled, can access and manage
protocol buffers; and a library that implements run-time support for
encoding (marshaling), decoding (unmarshaling), and accessing protocol
buffers.
There is support for gRPC in Go using protocol buffers.
See the note at the bottom of this file for details.
There are no insertion points in the plugin.
GoGoProtobuf provides extensions for protocol buffers and GoProtobuf
see http://github.com/gogo/protobuf/gogoproto/doc.go
## Using protocol buffers with Go ##
Once the software is installed, there are two steps to using it.
First you must compile the protocol buffer definitions and then import
them, with the support library, into your program.
To compile the protocol buffer definition, run protoc with the --gogo_out
parameter set to the directory you want to output the Go code to.
protoc --gogo_out=. *.proto
The generated files will be suffixed .pb.go. See the Test code below
for an example using such a file.
The package comment for the proto library contains text describing
the interface provided in Go for protocol buffers. Here is an edited
version.
If you are using any gogo.proto extensions you will need to specify the
proto_path to include the descriptor.proto and gogo.proto.
gogo.proto is located in github.com/gogo/protobuf/gogoproto
This should be fine, since your import is the same.
descriptor.proto is located in either github.com/gogo/protobuf/protobuf
or code.google.com/p/protobuf/trunk/src/
Its import is google/protobuf/descriptor.proto so it might need some help.
protoc --gogo_out=. -I=.:github.com/gogo/protobuf/protobuf *.proto
==========
The proto package converts data structures to and from the
wire format of protocol buffers. It works in concert with the
Go source code generated for .proto files by the protocol compiler.
A summary of the properties of the protocol buffer interface
for a protocol buffer variable v:
- Names are turned from camel_case to CamelCase for export.
- There are no methods on v to set fields; just treat
them as structure fields.
- There are getters that return a field's value if set,
and return the field's default value if unset.
The getters work even if the receiver is a nil message.
- The zero value for a struct is its correct initialization state.
All desired fields must be set before marshaling.
- A Reset() method will restore a protobuf struct to its zero state.
- Non-repeated fields are pointers to the values; nil means unset.
That is, optional or required field int32 f becomes F *int32.
- Repeated fields are slices.
- Helper functions are available to aid the setting of fields.
Helpers for getting values are superseded by the
GetFoo methods and their use is deprecated.
msg.Foo = proto.String("hello") // set field
- Constants are defined to hold the default values of all fields that
have them. They have the form Default_StructName_FieldName.
Because the getter methods handle defaulted values,
direct use of these constants should be rare.
- Enums are given type names and maps from names to values.
Enum values are prefixed with the enum's type name. Enum types have
a String method, and a Enum method to assist in message construction.
- Nested groups and enums have type names prefixed with the name of
the surrounding message type.
- Extensions are given descriptor names that start with E_,
followed by an underscore-delimited list of the nested messages
that contain it (if any) followed by the CamelCased name of the
extension field itself. HasExtension, ClearExtension, GetExtension
and SetExtension are functions for manipulating extensions.
- Oneof field sets are given a single field in their message,
with distinguished wrapper types for each possible field value.
- Marshal and Unmarshal are functions to encode and decode the wire format.
When the .proto file specifies `syntax="proto3"`, there are some differences:
- Non-repeated fields of non-message type are values instead of pointers.
- Getters are only generated for message and oneof fields.
- Enum types do not get an Enum method.
Consider file test.proto, containing
```proto
package example;
enum FOO { X = 17; };
message Test {
required string label = 1;
optional int32 type = 2 [default=77];
repeated int64 reps = 3;
optional group OptionalGroup = 4 {
required string RequiredField = 5;
}
}
```
To create and play with a Test object from the example package,
```go
package main
import (
"log"
"github.com/gogo/protobuf/proto"
"path/to/example"
)
func main() {
test := &example.Test {
Label: proto.String("hello"),
Type: proto.Int32(17),
Reps: []int64{1, 2, 3},
Optionalgroup: &example.Test_OptionalGroup {
RequiredField: proto.String("good bye"),
},
}
data, err := proto.Marshal(test)
if err != nil {
log.Fatal("marshaling error: ", err)
}
newTest := &example.Test{}
err = proto.Unmarshal(data, newTest)
if err != nil {
log.Fatal("unmarshaling error: ", err)
}
// Now test and newTest contain the same data.
if test.GetLabel() != newTest.GetLabel() {
log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel())
}
// etc.
}
```
## Parameters ##
To pass extra parameters to the plugin, use a comma-separated
parameter list separated from the output directory by a colon:
protoc --gogo_out=plugins=grpc,import_path=mypackage:. *.proto
- `import_prefix=xxx` - a prefix that is added onto the beginning of
all imports. Useful for things like generating protos in a
subdirectory, or regenerating vendored protobufs in-place.
- `import_path=foo/bar` - used as the package if no input files
declare `go_package`. If it contains slashes, everything up to the
rightmost slash is ignored.
- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to
load. The only plugin in this repo is `grpc`.
- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is
associated with Go package quux/shme. This is subject to the
import_prefix parameter.
## gRPC Support ##
If a proto file specifies RPC services, protoc-gen-go can be instructed to
generate code compatible with gRPC (http://www.grpc.io/). To do this, pass
the `plugins` parameter to protoc-gen-go; the usual way is to insert it into
the --go_out argument to protoc:
protoc --gogo_out=plugins=grpc:. *.proto
## Compatibility ##
The library and the generated code are expected to be stable over time.
However, we reserve the right to make breaking changes without notice for the
following reasons:
- Security. A security issue in the specification or implementation may come to
light whose resolution requires breaking compatibility. We reserve the right
to address such security issues.
- Unspecified behavior. There are some aspects of the Protocol Buffers
specification that are undefined. Programs that depend on such unspecified
behavior may break in future releases.
- Specification errors or changes. If it becomes necessary to address an
inconsistency, incompleteness, or change in the Protocol Buffers
specification, resolving the issue could affect the meaning or legality of
existing programs. We reserve the right to address such issues, including
updating the implementations.
- Bugs. If the library has a bug that violates the specification, a program
that depends on the buggy behavior may break if the bug is fixed. We reserve
the right to fix such bugs.
- Adding methods or fields to generated structs. These may conflict with field
names that already exist in a schema, causing applications to break. When the
code generator encounters a field in the schema that would collide with a
generated field or method name, the code generator will append an underscore
to the generated field or method name.
- Adding, removing, or changing methods or fields in generated structs that
start with `XXX`. These parts of the generated code are exported out of
necessity, but should not be considered part of the public API.
- Adding, removing, or changing unexported symbols in generated code.
Any breaking changes outside of these will be announced 6 months in advance to
protobuf@googlegroups.com.
You should, whenever possible, use generated code created by the `protoc-gen-go`
tool built at the same commit as the `proto` package. The `proto` package
declares package-level constants in the form `ProtoPackageIsVersionX`.
Application code and generated code may depend on one of these constants to
ensure that compilation will fail if the available version of the proto library
is too old. Whenever we make a change to the generated code that requires newer
library support, in the same commit we will increment the version number of the
generated code and declare a new package-level constant whose name incorporates
the latest version number. Removing a compatibility constant is considered a
breaking change and would be subject to the announcement policy stated above.
## Plugins ##
The `protoc-gen-go/generator` package exposes a plugin interface,
which is used by the gRPC code generation. This interface is not
supported and is subject to incompatible changes without notice.

117
vendor/github.com/gogo/protobuf/Readme.md generated vendored Normal file
View File

@ -0,0 +1,117 @@
# Protocol Buffers for Go with Gadgets
[![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf)
gogoprotobuf is a fork of <a href="https://github.com/golang/protobuf">golang/protobuf</a> with extra code generation features.
This code generation is used to achieve:
- fast marshalling and unmarshalling
- more canonical Go structures
- goprotobuf compatibility
- less typing by optionally generating extra helper code
- peace of mind by optionally generating test and benchmark code
- other serialization formats
Keeping track of how up to date gogoprotobuf is relative to golang/protobuf is done in this
<a href="https://github.com/gogo/protobuf/issues/191">issue</a>
## Users
These projects use gogoprotobuf:
- <a href="http://godoc.org/github.com/coreos/etcd">etcd</a> - <a href="https://blog.gopheracademy.com/advent-2015/etcd-distributed-key-value-store-with-grpc-http2/">blog</a> - <a href="https://github.com/coreos/etcd/blob/master/etcdserver/etcdserverpb/etcdserver.proto">sample proto file</a>
- <a href="https://www.spacemonkey.com/">spacemonkey</a> - <a href="https://www.spacemonkey.com/blog/posts/go-space-monkey">blog</a>
- <a href="http://badoo.com">badoo</a> - <a href="https://github.com/badoo/lsd/blob/32061f501c5eca9c76c596d790b450501ba27b2f/proto/lsd.proto">sample proto file</a>
- <a href="https://github.com/mesos/mesos-go">mesos-go</a> - <a href="https://github.com/mesos/mesos-go/blob/f9e5fb7c2f50ab5f23299f26b6b07c5d6afdd252/api/v0/mesosproto/authentication.proto">sample proto file</a>
- <a href="https://github.com/mozilla-services/heka">heka</a> - <a href="https://github.com/mozilla-services/heka/commit/eb72fbf7d2d28249fbaf8d8dc6607f4eb6f03351">the switch from golang/protobuf to gogo/protobuf when it was still on code.google.com</a>
- <a href="https://github.com/cockroachdb/cockroach">cockroachdb</a> - <a href="https://github.com/cockroachdb/cockroach/blob/651d54d393e391a30154e9117ab4b18d9ee6d845/roachpb/metadata.proto">sample proto file</a>
- <a href="https://github.com/jbenet/go-ipfs">go-ipfs</a> - <a href="https://github.com/ipfs/go-ipfs/blob/2b6da0c024f28abeb16947fb452787196a6b56a2/merkledag/pb/merkledag.proto">sample proto file</a>
- <a href="https://github.com/philhofer/rkive">rkive-go</a> - <a href="https://github.com/philhofer/rkive/blob/e5dd884d3ea07b341321073882ae28aa16dd11be/rpbc/riak_dt.proto">sample proto file</a>
- <a href="https://www.dropbox.com">dropbox</a>
- <a href="https://srclib.org/">srclib</a> - <a href="https://github.com/sourcegraph/srclib/blob/6538858f0c410cac5c63440317b8d009e889d3fb/graph/def.proto">sample proto file</a>
- <a href="http://www.adyoulike.com/">adyoulike</a>
- <a href="http://www.cloudfoundry.org/">cloudfoundry</a> - <a href="https://github.com/cloudfoundry/bbs/blob/d673710b8c4211037805129944ee4c5373d6588a/models/events.proto">sample proto file</a>
- <a href="http://kubernetes.io/">kubernetes</a> - <a href="https://github.com/kubernetes/kubernetes/tree/88d8628137f94ee816aaa6606ae8cd045dee0bff/cmd/libs/go2idl">go2idl built on top of gogoprotobuf</a>
- <a href="https://dgraph.io/">dgraph</a> - <a href="https://github.com/dgraph-io/dgraph/releases/tag/v0.4.3">release notes</a> - <a href="https://discuss.dgraph.io/t/gogoprotobuf-is-extremely-fast/639">benchmarks</a></a>
- <a href="https://github.com/centrifugal/centrifugo">centrifugo</a> - <a href="https://forum.golangbridge.org/t/centrifugo-real-time-messaging-websocket-or-sockjs-server-v1-5-0-released/2861">release notes</a> - <a href="https://medium.com/@fzambia/centrifugo-protobuf-inside-json-outside-21d39bdabd68#.o3icmgjqd">blog</a>
- <a href="https://github.com/docker/swarmkit">docker swarmkit</a> - <a href="https://github.com/docker/swarmkit/blob/63600e01af3b8da2a0ed1c9fa6e1ae4299d75edb/api/objects.proto">sample proto file</a>
- <a href="https://nats.io/">nats.io</a> - <a href="https://github.com/nats-io/go-nats-streaming/blob/master/pb/protocol.proto">go-nats-streaming</a>
- <a href="https://github.com/pingcap/tidb">tidb</a> - Communication between <a href="https://github.com/pingcap/tipb/blob/master/generate-go.sh#L4">tidb</a> and <a href="https://github.com/pingcap/kvproto/blob/master/generate_go.sh#L3">tikv</a>
- <a href="https://github.com/AsynkronIT/protoactor-go">protoactor-go</a> - <a href="https://github.com/AsynkronIT/protoactor-go/blob/dev/protobuf/protoc-gen-protoactor/main.go">vanity command</a> that also generates actors from service definitions
Please lets us know if you are using gogoprotobuf by posting on our <a href="https://groups.google.com/forum/#!topic/gogoprotobuf/Brw76BxmFpQ">GoogleGroup</a>.
### Mentioned
- <a href="http://www.slideshare.net/albertstrasheim/serialization-in-go">Cloudflare - go serialization talk - Albert Strasheim</a>
- <a href="http://gophercon.sourcegraph.com/post/83747547505/writing-a-high-performance-database-in-go">gophercon</a>
- <a href="https://github.com/alecthomas/go_serialization_benchmarks">alecthomas' go serialization benchmarks</a>
## Getting Started
There are several ways to use gogoprotobuf, but for all you need to install go and protoc.
After that you can choose:
- Speed
- More Speed and more generated code
- Most Speed and most customization
### Installation
To install it, you must first have Go (at least version 1.6.3) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). Go 1.7.1 and 1.8 are continuously tested.
Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf).
Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.2.0 are continuously tested.
### Speed
Install the protoc-gen-gofast binary
go get github.com/gogo/protobuf/protoc-gen-gofast
Use it to generate faster marshaling and unmarshaling go code for your protocol buffers.
protoc --gofast_out=. myproto.proto
This does not allow you to use any of the other gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md).
### More Speed and more generated code
Fields without pointers cause less time in the garbage collector.
More code generation results in more convenient methods.
Other binaries are also included:
protoc-gen-gogofast (same as gofast, but imports gogoprotobuf)
protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields)
protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods)
Installing any of these binaries is easy. Simply run:
go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/{binary}
go get github.com/gogo/protobuf/gogoproto
These binaries allow you to using gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md).
### Most Speed and most customization
Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize.
gogoprotobuf also offers more serialization formats and generation of tests and even more methods.
Please visit the [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md) page for more documentation.
Install protoc-gen-gogo:
go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/jsonpb
go get github.com/gogo/protobuf/protoc-gen-gogo
go get github.com/gogo/protobuf/gogoproto
## GRPC
It works the same as golang/protobuf, simply specify the plugin.
Here is an example using gofast:
protoc --gofast_out=plugins=grpc:. my.proto

190
vendor/github.com/gogo/protobuf/bench.md generated vendored Normal file
View File

@ -0,0 +1,190 @@
# Benchmarks
## How to reproduce
For a comparison run:
make bench
followed by [benchcmp](http://code.google.com/p/go/source/browse/misc/benchcmp benchcmp) on the resulting files:
$GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshaler.txt
$GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt
Benchmarks ran on Revision: 11c56be39364
June 2013
Processor 2,66 GHz Intel Core i7
Memory 8 GB 1067 MHz DDR3
## Marshaler
<table>
<tr><td>benchmark</td><td>old ns/op</td><td>new ns/op</td><td>delta</td></tr>
<tr><td>BenchmarkNidOptNativeProtoMarshal</td><td>2656</td><td>889</td><td>-66.53%</td></tr>
<tr><td>BenchmarkNinOptNativeProtoMarshal</td><td>2651</td><td>1015</td><td>-61.71%</td></tr>
<tr><td>BenchmarkNidRepNativeProtoMarshal</td><td>42661</td><td>12519</td><td>-70.65%</td></tr>
<tr><td>BenchmarkNinRepNativeProtoMarshal</td><td>42306</td><td>12354</td><td>-70.80%</td></tr>
<tr><td>BenchmarkNidRepPackedNativeProtoMarshal</td><td>34148</td><td>11902</td><td>-65.15%</td></tr>
<tr><td>BenchmarkNinRepPackedNativeProtoMarshal</td><td>33375</td><td>11969</td><td>-64.14%</td></tr>
<tr><td>BenchmarkNidOptStructProtoMarshal</td><td>7148</td><td>3727</td><td>-47.86%</td></tr>
<tr><td>BenchmarkNinOptStructProtoMarshal</td><td>6956</td><td>3481</td><td>-49.96%</td></tr>
<tr><td>BenchmarkNidRepStructProtoMarshal</td><td>46551</td><td>19492</td><td>-58.13%</td></tr>
<tr><td>BenchmarkNinRepStructProtoMarshal</td><td>46715</td><td>19043</td><td>-59.24%</td></tr>
<tr><td>BenchmarkNidEmbeddedStructProtoMarshal</td><td>5231</td><td>2050</td><td>-60.81%</td></tr>
<tr><td>BenchmarkNinEmbeddedStructProtoMarshal</td><td>4665</td><td>2000</td><td>-57.13%</td></tr>
<tr><td>BenchmarkNidNestedStructProtoMarshal</td><td>181106</td><td>103604</td><td>-42.79%</td></tr>
<tr><td>BenchmarkNinNestedStructProtoMarshal</td><td>182053</td><td>102069</td><td>-43.93%</td></tr>
<tr><td>BenchmarkNidOptCustomProtoMarshal</td><td>1209</td><td>310</td><td>-74.36%</td></tr>
<tr><td>BenchmarkNinOptCustomProtoMarshal</td><td>1435</td><td>277</td><td>-80.70%</td></tr>
<tr><td>BenchmarkNidRepCustomProtoMarshal</td><td>4126</td><td>763</td><td>-81.51%</td></tr>
<tr><td>BenchmarkNinRepCustomProtoMarshal</td><td>3972</td><td>769</td><td>-80.64%</td></tr>
<tr><td>BenchmarkNinOptNativeUnionProtoMarshal</td><td>973</td><td>303</td><td>-68.86%</td></tr>
<tr><td>BenchmarkNinOptStructUnionProtoMarshal</td><td>1536</td><td>521</td><td>-66.08%</td></tr>
<tr><td>BenchmarkNinEmbeddedStructUnionProtoMarshal</td><td>2327</td><td>884</td><td>-62.01%</td></tr>
<tr><td>BenchmarkNinNestedStructUnionProtoMarshal</td><td>2070</td><td>743</td><td>-64.11%</td></tr>
<tr><td>BenchmarkTreeProtoMarshal</td><td>1554</td><td>838</td><td>-46.07%</td></tr>
<tr><td>BenchmarkOrBranchProtoMarshal</td><td>3156</td><td>2012</td><td>-36.25%</td></tr>
<tr><td>BenchmarkAndBranchProtoMarshal</td><td>3183</td><td>1996</td><td>-37.29%</td></tr>
<tr><td>BenchmarkLeafProtoMarshal</td><td>965</td><td>606</td><td>-37.20%</td></tr>
<tr><td>BenchmarkDeepTreeProtoMarshal</td><td>2316</td><td>1283</td><td>-44.60%</td></tr>
<tr><td>BenchmarkADeepBranchProtoMarshal</td><td>2719</td><td>1492</td><td>-45.13%</td></tr>
<tr><td>BenchmarkAndDeepBranchProtoMarshal</td><td>4663</td><td>2922</td><td>-37.34%</td></tr>
<tr><td>BenchmarkDeepLeafProtoMarshal</td><td>1849</td><td>1016</td><td>-45.05%</td></tr>
<tr><td>BenchmarkNilProtoMarshal</td><td>439</td><td>76</td><td>-82.53%</td></tr>
<tr><td>BenchmarkNidOptEnumProtoMarshal</td><td>514</td><td>152</td><td>-70.43%</td></tr>
<tr><td>BenchmarkNinOptEnumProtoMarshal</td><td>550</td><td>158</td><td>-71.27%</td></tr>
<tr><td>BenchmarkNidRepEnumProtoMarshal</td><td>647</td><td>207</td><td>-68.01%</td></tr>
<tr><td>BenchmarkNinRepEnumProtoMarshal</td><td>662</td><td>213</td><td>-67.82%</td></tr>
<tr><td>BenchmarkTimerProtoMarshal</td><td>934</td><td>271</td><td>-70.99%</td></tr>
<tr><td>BenchmarkMyExtendableProtoMarshal</td><td>608</td><td>185</td><td>-69.57%</td></tr>
<tr><td>BenchmarkOtherExtenableProtoMarshal</td><td>1112</td><td>332</td><td>-70.14%</td></tr>
</table>
<table>
<tr><td>benchmark</td><td>old MB/s</td><td>new MB/s</td><td>speedup</td></tr>
<tr><td>BenchmarkNidOptNativeProtoMarshal</td><td>126.86</td><td>378.86</td><td>2.99x</td></tr>
<tr><td>BenchmarkNinOptNativeProtoMarshal</td><td>114.27</td><td>298.42</td><td>2.61x</td></tr>
<tr><td>BenchmarkNidRepNativeProtoMarshal</td><td>164.25</td><td>561.20</td><td>3.42x</td></tr>
<tr><td>BenchmarkNinRepNativeProtoMarshal</td><td>166.10</td><td>568.23</td><td>3.42x</td></tr>
<tr><td>BenchmarkNidRepPackedNativeProtoMarshal</td><td>99.10</td><td>283.97</td><td>2.87x</td></tr>
<tr><td>BenchmarkNinRepPackedNativeProtoMarshal</td><td>101.30</td><td>282.31</td><td>2.79x</td></tr>
<tr><td>BenchmarkNidOptStructProtoMarshal</td><td>176.83</td><td>339.07</td><td>1.92x</td></tr>
<tr><td>BenchmarkNinOptStructProtoMarshal</td><td>163.59</td><td>326.57</td><td>2.00x</td></tr>
<tr><td>BenchmarkNidRepStructProtoMarshal</td><td>178.84</td><td>427.49</td><td>2.39x</td></tr>
<tr><td>BenchmarkNinRepStructProtoMarshal</td><td>178.70</td><td>437.69</td><td>2.45x</td></tr>
<tr><td>BenchmarkNidEmbeddedStructProtoMarshal</td><td>124.24</td><td>317.56</td><td>2.56x</td></tr>
<tr><td>BenchmarkNinEmbeddedStructProtoMarshal</td><td>132.03</td><td>307.99</td><td>2.33x</td></tr>
<tr><td>BenchmarkNidNestedStructProtoMarshal</td><td>192.91</td><td>337.86</td><td>1.75x</td></tr>
<tr><td>BenchmarkNinNestedStructProtoMarshal</td><td>192.44</td><td>344.45</td><td>1.79x</td></tr>
<tr><td>BenchmarkNidOptCustomProtoMarshal</td><td>29.77</td><td>116.03</td><td>3.90x</td></tr>
<tr><td>BenchmarkNinOptCustomProtoMarshal</td><td>22.29</td><td>115.38</td><td>5.18x</td></tr>
<tr><td>BenchmarkNidRepCustomProtoMarshal</td><td>35.14</td><td>189.80</td><td>5.40x</td></tr>
<tr><td>BenchmarkNinRepCustomProtoMarshal</td><td>36.50</td><td>188.40</td><td>5.16x</td></tr>
<tr><td>BenchmarkNinOptNativeUnionProtoMarshal</td><td>32.87</td><td>105.39</td><td>3.21x</td></tr>
<tr><td>BenchmarkNinOptStructUnionProtoMarshal</td><td>66.40</td><td>195.76</td><td>2.95x</td></tr>
<tr><td>BenchmarkNinEmbeddedStructUnionProtoMarshal</td><td>93.24</td><td>245.26</td><td>2.63x</td></tr>
<tr><td>BenchmarkNinNestedStructUnionProtoMarshal</td><td>57.49</td><td>160.06</td><td>2.78x</td></tr>
<tr><td>BenchmarkTreeProtoMarshal</td><td>137.64</td><td>255.12</td><td>1.85x</td></tr>
<tr><td>BenchmarkOrBranchProtoMarshal</td><td>137.80</td><td>216.10</td><td>1.57x</td></tr>
<tr><td>BenchmarkAndBranchProtoMarshal</td><td>136.64</td><td>217.89</td><td>1.59x</td></tr>
<tr><td>BenchmarkLeafProtoMarshal</td><td>214.48</td><td>341.53</td><td>1.59x</td></tr>
<tr><td>BenchmarkDeepTreeProtoMarshal</td><td>95.85</td><td>173.03</td><td>1.81x</td></tr>
<tr><td>BenchmarkADeepBranchProtoMarshal</td><td>82.73</td><td>150.78</td><td>1.82x</td></tr>
<tr><td>BenchmarkAndDeepBranchProtoMarshal</td><td>96.72</td><td>153.98</td><td>1.59x</td></tr>
<tr><td>BenchmarkDeepLeafProtoMarshal</td><td>117.34</td><td>213.41</td><td>1.82x</td></tr>
<tr><td>BenchmarkNidOptEnumProtoMarshal</td><td>3.89</td><td>13.16</td><td>3.38x</td></tr>
<tr><td>BenchmarkNinOptEnumProtoMarshal</td><td>1.82</td><td>6.30</td><td>3.46x</td></tr>
<tr><td>BenchmarkNidRepEnumProtoMarshal</td><td>12.36</td><td>38.50</td><td>3.11x</td></tr>
<tr><td>BenchmarkNinRepEnumProtoMarshal</td><td>12.08</td><td>37.53</td><td>3.11x</td></tr>
<tr><td>BenchmarkTimerProtoMarshal</td><td>73.81</td><td>253.87</td><td>3.44x</td></tr>
<tr><td>BenchmarkMyExtendableProtoMarshal</td><td>13.15</td><td>43.08</td><td>3.28x</td></tr>
<tr><td>BenchmarkOtherExtenableProtoMarshal</td><td>24.28</td><td>81.09</td><td>3.34x</td></tr>
</table>
## Unmarshaler
<table>
<tr><td>benchmark</td><td>old ns/op</td><td>new ns/op</td><td>delta</td></tr>
<tr><td>BenchmarkNidOptNativeProtoUnmarshal</td><td>2521</td><td>1006</td><td>-60.10%</td></tr>
<tr><td>BenchmarkNinOptNativeProtoUnmarshal</td><td>2529</td><td>1750</td><td>-30.80%</td></tr>
<tr><td>BenchmarkNidRepNativeProtoUnmarshal</td><td>49067</td><td>35299</td><td>-28.06%</td></tr>
<tr><td>BenchmarkNinRepNativeProtoUnmarshal</td><td>47990</td><td>35456</td><td>-26.12%</td></tr>
<tr><td>BenchmarkNidRepPackedNativeProtoUnmarshal</td><td>26456</td><td>23950</td><td>-9.47%</td></tr>
<tr><td>BenchmarkNinRepPackedNativeProtoUnmarshal</td><td>26499</td><td>24037</td><td>-9.29%</td></tr>
<tr><td>BenchmarkNidOptStructProtoUnmarshal</td><td>6803</td><td>3873</td><td>-43.07%</td></tr>
<tr><td>BenchmarkNinOptStructProtoUnmarshal</td><td>6786</td><td>4154</td><td>-38.79%</td></tr>
<tr><td>BenchmarkNidRepStructProtoUnmarshal</td><td>56276</td><td>31970</td><td>-43.19%</td></tr>
<tr><td>BenchmarkNinRepStructProtoUnmarshal</td><td>48750</td><td>31832</td><td>-34.70%</td></tr>
<tr><td>BenchmarkNidEmbeddedStructProtoUnmarshal</td><td>4556</td><td>1973</td><td>-56.69%</td></tr>
<tr><td>BenchmarkNinEmbeddedStructProtoUnmarshal</td><td>4485</td><td>1975</td><td>-55.96%</td></tr>
<tr><td>BenchmarkNidNestedStructProtoUnmarshal</td><td>223395</td><td>135844</td><td>-39.19%</td></tr>
<tr><td>BenchmarkNinNestedStructProtoUnmarshal</td><td>226446</td><td>134022</td><td>-40.82%</td></tr>
<tr><td>BenchmarkNidOptCustomProtoUnmarshal</td><td>1859</td><td>300</td><td>-83.86%</td></tr>
<tr><td>BenchmarkNinOptCustomProtoUnmarshal</td><td>1486</td><td>402</td><td>-72.95%</td></tr>
<tr><td>BenchmarkNidRepCustomProtoUnmarshal</td><td>8229</td><td>1669</td><td>-79.72%</td></tr>
<tr><td>BenchmarkNinRepCustomProtoUnmarshal</td><td>8253</td><td>1649</td><td>-80.02%</td></tr>
<tr><td>BenchmarkNinOptNativeUnionProtoUnmarshal</td><td>840</td><td>307</td><td>-63.45%</td></tr>
<tr><td>BenchmarkNinOptStructUnionProtoUnmarshal</td><td>1395</td><td>639</td><td>-54.19%</td></tr>
<tr><td>BenchmarkNinEmbeddedStructUnionProtoUnmarshal</td><td>2297</td><td>1167</td><td>-49.19%</td></tr>
<tr><td>BenchmarkNinNestedStructUnionProtoUnmarshal</td><td>1820</td><td>889</td><td>-51.15%</td></tr>
<tr><td>BenchmarkTreeProtoUnmarshal</td><td>1521</td><td>720</td><td>-52.66%</td></tr>
<tr><td>BenchmarkOrBranchProtoUnmarshal</td><td>2669</td><td>1385</td><td>-48.11%</td></tr>
<tr><td>BenchmarkAndBranchProtoUnmarshal</td><td>2667</td><td>1420</td><td>-46.76%</td></tr>
<tr><td>BenchmarkLeafProtoUnmarshal</td><td>1171</td><td>584</td><td>-50.13%</td></tr>
<tr><td>BenchmarkDeepTreeProtoUnmarshal</td><td>2065</td><td>1081</td><td>-47.65%</td></tr>
<tr><td>BenchmarkADeepBranchProtoUnmarshal</td><td>2695</td><td>1178</td><td>-56.29%</td></tr>
<tr><td>BenchmarkAndDeepBranchProtoUnmarshal</td><td>4055</td><td>1918</td><td>-52.70%</td></tr>
<tr><td>BenchmarkDeepLeafProtoUnmarshal</td><td>1758</td><td>865</td><td>-50.80%</td></tr>
<tr><td>BenchmarkNilProtoUnmarshal</td><td>564</td><td>63</td><td>-88.79%</td></tr>
<tr><td>BenchmarkNidOptEnumProtoUnmarshal</td><td>762</td><td>73</td><td>-90.34%</td></tr>
<tr><td>BenchmarkNinOptEnumProtoUnmarshal</td><td>764</td><td>163</td><td>-78.66%</td></tr>
<tr><td>BenchmarkNidRepEnumProtoUnmarshal</td><td>1078</td><td>447</td><td>-58.53%</td></tr>
<tr><td>BenchmarkNinRepEnumProtoUnmarshal</td><td>1071</td><td>479</td><td>-55.28%</td></tr>
<tr><td>BenchmarkTimerProtoUnmarshal</td><td>1128</td><td>362</td><td>-67.91%</td></tr>
<tr><td>BenchmarkMyExtendableProtoUnmarshal</td><td>808</td><td>217</td><td>-73.14%</td></tr>
<tr><td>BenchmarkOtherExtenableProtoUnmarshal</td><td>1233</td><td>517</td><td>-58.07%</td></tr>
</table>
<table>
<tr><td>benchmark</td><td>old MB/s</td><td>new MB/s</td><td>speedup</td></tr>
<tr><td>BenchmarkNidOptNativeProtoUnmarshal</td><td>133.67</td><td>334.98</td><td>2.51x</td></tr>
<tr><td>BenchmarkNinOptNativeProtoUnmarshal</td><td>119.77</td><td>173.08</td><td>1.45x</td></tr>
<tr><td>BenchmarkNidRepNativeProtoUnmarshal</td><td>143.23</td><td>199.12</td><td>1.39x</td></tr>
<tr><td>BenchmarkNinRepNativeProtoUnmarshal</td><td>146.07</td><td>198.16</td><td>1.36x</td></tr>
<tr><td>BenchmarkNidRepPackedNativeProtoUnmarshal</td><td>127.80</td><td>141.04</td><td>1.10x</td></tr>
<tr><td>BenchmarkNinRepPackedNativeProtoUnmarshal</td><td>127.55</td><td>140.78</td><td>1.10x</td></tr>
<tr><td>BenchmarkNidOptStructProtoUnmarshal</td><td>185.79</td><td>326.31</td><td>1.76x</td></tr>
<tr><td>BenchmarkNinOptStructProtoUnmarshal</td><td>167.68</td><td>273.66</td><td>1.63x</td></tr>
<tr><td>BenchmarkNidRepStructProtoUnmarshal</td><td>147.88</td><td>260.39</td><td>1.76x</td></tr>
<tr><td>BenchmarkNinRepStructProtoUnmarshal</td><td>171.20</td><td>261.97</td><td>1.53x</td></tr>
<tr><td>BenchmarkNidEmbeddedStructProtoUnmarshal</td><td>142.86</td><td>329.42</td><td>2.31x</td></tr>
<tr><td>BenchmarkNinEmbeddedStructProtoUnmarshal</td><td>137.33</td><td>311.83</td><td>2.27x</td></tr>
<tr><td>BenchmarkNidNestedStructProtoUnmarshal</td><td>154.97</td><td>259.47</td><td>1.67x</td></tr>
<tr><td>BenchmarkNinNestedStructProtoUnmarshal</td><td>154.32</td><td>258.42</td><td>1.67x</td></tr>
<tr><td>BenchmarkNidOptCustomProtoUnmarshal</td><td>19.36</td><td>119.66</td><td>6.18x</td></tr>
<tr><td>BenchmarkNinOptCustomProtoUnmarshal</td><td>21.52</td><td>79.50</td><td>3.69x</td></tr>
<tr><td>BenchmarkNidRepCustomProtoUnmarshal</td><td>17.62</td><td>86.86</td><td>4.93x</td></tr>
<tr><td>BenchmarkNinRepCustomProtoUnmarshal</td><td>17.57</td><td>87.92</td><td>5.00x</td></tr>
<tr><td>BenchmarkNinOptNativeUnionProtoUnmarshal</td><td>38.07</td><td>104.12</td><td>2.73x</td></tr>
<tr><td>BenchmarkNinOptStructUnionProtoUnmarshal</td><td>73.08</td><td>159.54</td><td>2.18x</td></tr>
<tr><td>BenchmarkNinEmbeddedStructUnionProtoUnmarshal</td><td>94.00</td><td>185.92</td><td>1.98x</td></tr>
<tr><td>BenchmarkNinNestedStructUnionProtoUnmarshal</td><td>65.35</td><td>133.75</td><td>2.05x</td></tr>
<tr><td>BenchmarkTreeProtoUnmarshal</td><td>141.28</td><td>297.13</td><td>2.10x</td></tr>
<tr><td>BenchmarkOrBranchProtoUnmarshal</td><td>162.56</td><td>313.96</td><td>1.93x</td></tr>
<tr><td>BenchmarkAndBranchProtoUnmarshal</td><td>163.06</td><td>306.15</td><td>1.88x</td></tr>
<tr><td>BenchmarkLeafProtoUnmarshal</td><td>176.72</td><td>354.19</td><td>2.00x</td></tr>
<tr><td>BenchmarkDeepTreeProtoUnmarshal</td><td>107.50</td><td>205.30</td><td>1.91x</td></tr>
<tr><td>BenchmarkADeepBranchProtoUnmarshal</td><td>83.48</td><td>190.88</td><td>2.29x</td></tr>
<tr><td>BenchmarkAndDeepBranchProtoUnmarshal</td><td>110.97</td><td>234.60</td><td>2.11x</td></tr>
<tr><td>BenchmarkDeepLeafProtoUnmarshal</td><td>123.40</td><td>250.73</td><td>2.03x</td></tr>
<tr><td>BenchmarkNidOptEnumProtoUnmarshal</td><td>2.62</td><td>27.16</td><td>10.37x</td></tr>
<tr><td>BenchmarkNinOptEnumProtoUnmarshal</td><td>1.31</td><td>6.11</td><td>4.66x</td></tr>
<tr><td>BenchmarkNidRepEnumProtoUnmarshal</td><td>7.42</td><td>17.88</td><td>2.41x</td></tr>
<tr><td>BenchmarkNinRepEnumProtoUnmarshal</td><td>7.47</td><td>16.69</td><td>2.23x</td></tr>
<tr><td>BenchmarkTimerProtoUnmarshal</td><td>61.12</td><td>190.34</td><td>3.11x</td></tr>
<tr><td>BenchmarkMyExtendableProtoUnmarshal</td><td>9.90</td><td>36.71</td><td>3.71x</td></tr>
<tr><td>BenchmarkOtherExtenableProtoUnmarshal</td><td>21.90</td><td>52.13</td><td>2.38x</td></tr>
</table>

68
vendor/github.com/gogo/protobuf/custom_types.md generated vendored Normal file
View File

@ -0,0 +1,68 @@
# Custom types
Custom types is a gogo protobuf extensions that allows for using a custom
struct type to decorate the underlying structure of the protocol message.
# How to use
## Defining the protobuf message
```proto
message CustomType {
optional ProtoType Field = 1 [(gogoproto.customtype) = "T"];
}
message ProtoType {
optional string Field = 1;
}
```
or alternatively you can declare the field type in the protocol message to be
`bytes`:
```proto
message BytesCustomType {
optional bytes Field = 1 [(gogoproto.customtype) = "T"];
}
```
The downside of using `bytes` is that it makes it harder to generate protobuf
code in other languages. In either case, it is the user responsibility to
ensure that the custom type marshals and unmarshals to the expected wire
format. That is, in the first example, gogo protobuf will not attempt to ensure
that the wire format of `ProtoType` and `T` are wire compatible.
## Custom type method signatures
The custom type must define the following methods with the given
signatures. Assuming the custom type is called `T`:
```go
func (t T) Marshal() ([]byte, error) {}
func (t *T) MarshalTo(data []byte) (n int, err error) {}
func (t *T) Unmarshal(data []byte) error {}
func (t T) MarshalJSON() ([]byte, error) {}
func (t *T) UnmarshalJSON(data []byte) error {}
// only required if the compare option is set
func (t T) Compare(other T) int {}
// only required if the equal option is set
func (t T) Equal(other T) bool {}
// only required if populate option is set
func NewPopulatedT(r randyThetest) *T {}
```
Check [t.go](test/t.go) for a full example
# Warnings and issues
`Warning about customtype: It is your responsibility to test all cases of your marshaling, unmarshaling and size methods implemented for your custom type.`
Issues with customtype include:
* <a href="https://github.com/gogo/protobuf/issues/199">A Bytes method is not allowed.<a/>
* <a href="https://github.com/gogo/protobuf/issues/132">Defining a customtype as a fake proto message is broken.</a>
* <a href="https://github.com/gogo/protobuf/issues/147">proto.Clone is broken.</a>
* <a href="https://github.com/gogo/protobuf/issues/125">Using a proto message as a customtype is not allowed.</a>
* <a href="https://github.com/gogo/protobuf/issues/200">cusomtype of type map can not UnmarshalText</a>
* <a href="https://github.com/gogo/protobuf/issues/201">customtype of type struct cannot jsonpb unmarshal</a>

161
vendor/github.com/gogo/protobuf/extensions.md generated vendored Normal file
View File

@ -0,0 +1,161 @@
# gogoprotobuf Extensions
Here is an [example.proto](https://github.com/gogo/protobuf/blob/master/test/example/example.proto) which uses most of the gogoprotobuf code generation plugins.
Please also look at the example [Makefile](https://github.com/gogo/protobuf/blob/master/test/example/Makefile) which shows how to specify the `descriptor.proto` and `gogo.proto` in your proto_path
The documentation at [http://godoc.org/github.com/gogo/protobuf/gogoproto](http://godoc.org/github.com/gogo/protobuf/gogoproto) describes the extensions made to goprotobuf in more detail.
Also see [http://godoc.org/github.com/gogo/protobuf/plugin/](http://godoc.org/github.com/gogo/protobuf/plugin/) for documentation of each of the extensions which have their own plugins.
# Fast Marshalling and Unmarshalling
Generating a `Marshal`, `MarshalTo`, `Size` (or `ProtoSize`) and `Unmarshal` method for a struct results in faster marshalling and unmarshalling than when using reflect.
See [BenchComparison](https://github.com/gogo/protobuf/blob/master/bench.md) for a comparison between reflect and generated code used for marshalling and unmarshalling.
<table>
<tr><td><b>Name</b></td><td><b>Option</b></td><td><b>Type</b></td><td><b>Description</b></td><td><b>Default</b></td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/marshalto">marshaler</a></td><td>Message</td><td>bool</td><td>if true, a Marshal and MarshalTo method is generated for the specific message</td><td>false</td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/size">sizer</a></td><td>Message</td><td>bool</td><td>if true, a Size method is generated for the specific message</td><td>false</td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/unmarshal">unmarshaler</a></td><td> Message </td><td> bool </td><td> if true, an Unmarshal method is generated for the specific message </td><td> false</td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/size">protosizer</a></td><td>Message</td><td>bool</td><td>if true, a ProtoSize method is generated for the specific message</td><td>false</td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/marshalto"> unsafe_marshaler</a> </td><td> Message </td><td> bool </td><td> if true, a Marshal and MarshalTo method is generated for the specific message. The generated code uses the unsafe package and is not compatible with big endian CPUs. </td><td> false</td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/unmarshal">unsafe_unmarshaler</a></td><td> Message </td><td> bool </td><td> if true, an Unmarshal method is generated for the specific message. The generated code uses the unsafe package and is not compatible with big endian CPUs. </td><td> false</td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/marshalto">stable_marshaler</a></td><td> Message </td><td> bool </td><td> if true, a Marshal and MarshalTo method is generated for the specific message, but unlike marshaler the output is guaranteed to be deterministic, at the sacrifice of some speed</td><td> false </td></tr>
<tr><td>typedecl (beta)</td><td> Message </td><td> bool </td><td> if false, type declaration of the message is excluded from the generated output. Requires the marshaler and unmarshaler to be generated.</td><td> true </td></tr>
</table>
# More Canonical Go Structures
Lots of times working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs.
You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a new struct.
`gogoprotobuf` tries to fix these problems with the nullable, embed, customtype, customname, casttype, castkey and castvalue field extensions.
<table>
<tr><td><b>Name</b></td><td><b>Option</b></td><td><b>Type</b></td><td><b>Description</b></td><td><b>Default</b></td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto">nullable</a></td><td> Field </td><td> bool </td><td> if false, a field is generated without a pointer (see warning below). </td><td> true </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto">embed</a></td><td> Field </td><td> bool </td><td> if true, the field is generated as an embedded field. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto">customtype</a> </td><td> Field </td><td> string </td><td> It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128. For more information please refer to the <a href="custom_types.md">CustomTypes</a> document </td><td> goprotobuf type </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto"> customname</a> (beta) </td><td> Field </td><td> string </td><td> Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. </td><td> goprotobuf field name </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto"> casttype</a> (beta) </td><td> Field </td><td> string </td><td> Changes the generated field type. It assumes that this type is castable to the original goprotobuf field type. It currently does not support maps, structs or enums. </td><td> goprotobuf field type </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto"> castkey </a> (beta) </td><td> Field </td><td> string </td><td> Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. </td><td> goprotobuf field type </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/gogoproto"> castvalue </a> (beta) </td><td> Field </td><td> string </td><td> Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. </td><td> goprotobuf field type </td></tr>
<tr><td>enum_customname (beta)</td><td> Enum </td><td> string </td><td>Sets the type name of an enum. If goproto_enum_prefix is enabled, this value will be used as a prefix when generating enum values.</td><td>goprotobuf enum type name. Helps with golint issues.</td></tr>
<tr><td>enumdecl (beta)</td><td> Enum </td><td> bool </td><td> if false, type declaration of the enum is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. </td><td> true </td></tr>
<tr><td>enumvalue_customname (beta) </td><td> Enum Value </td><td> string </td><td>Changes the generated enum name. Helps with golint issues.</td><td>goprotobuf enum value name</td></tr>
<tr><td><a href="https://github.com/gogo/protobuf/blob/master/test/types/types.proto">stdtime</a></td><td> Timestamp Field </td><td> bool </td><td>Changes the Well Known Timestamp Type to time.Time</td><td>Timestamp</td></tr>
<tr><td><a href="https://github.com/gogo/protobuf/blob/master/test/types/types.proto">stdduration</a></td><td> Duration Field </td><td> bool </td><td>Changes the Well Known Duration Type to time.Duration</td><td>Duration</td></tr>
</table>
`Warning about nullable: according to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set.`
# Goprotobuf Compatibility
Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers (see the section on tests below).
Gogoprotobuf generates the same code as goprotobuf if no extensions are used.
The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf.
<table>
<tr><td><b>Name</b></td><td><b>Option</b></td><td><b>Type</b></td><td><b>Description</b></td><td><b>Default</b></td></tr>
<tr><td> gogoproto_import </td><td> File </td><td> bool </td><td> if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. </td><td> true </td></tr>
<tr><td> goproto_enum_prefix </td><td> Enum </td><td> bool </td><td> if false, generates the enum constant names without the messagetype prefix </td><td> true </td></tr>
<tr><td> goproto_getters </td><td> Message </td><td> bool </td><td> if false, the message is generated without get methods, this is useful when you would rather want to use face </td><td> true </td></tr>
<tr><td> goproto_stringer </td><td> Message </td><td> bool </td><td> if false, the message is generated without the default string method, this is useful for rather using stringer </td><td> true </td></tr>
<tr><td> goproto_enum_stringer (experimental) </td><td> Enum </td><td> bool </td><td> if false, the enum is generated without the default string method, this is useful for rather using enum_stringer </td><td> true </td></tr>
<tr><td> goproto_extensions_map (beta) </td><td> Message </td><td> bool </td><td> if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension </td><td> true </td></tr>
<tr><td> goproto_unrecognized (beta) </td><td> Message </td><td> bool </td><td>if false, XXX_unrecognized field is not generated. This is useful to reduce GC pressure at the cost of losing information about unrecognized fields. </td><td> true </td></tr>
</table>
# Less Typing
The Protocol Buffer language is very parseable and extra code can be easily generated for structures.
Helper methods, functions and interfaces can be generated by triggering certain extensions like gostring.
<table>
<tr><td><b>Name</b></td><td><b>Option</b></td><td><b>Type</b></td><td><b>Description</b></td><td><b>Default</b></td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/gostring">gostring</a></td><td> Message </td><td> bool </td><td> if true, a `GoString` method is generated. This returns a string representing valid go code to reproduce the current state of the struct. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/union"> onlyone</a> (deprecated) </td><td> Message </td><td> bool </td><td> if true, all fields must be nullable and only one of the fields may be set, like a union. Two methods are generated: `GetValue() interface{}` and `SetValue(v interface{}) (set bool)`. These provide easier interaction with a union. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/equal"> equal</a></td><td> Message </td><td> bool </td><td> if true, an Equal method is generated </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/compare"> compare</a></td><td> Message </td><td> bool </td><td> if true, a Compare method is generated. This is very useful for quickly implementing sort on a list of protobuf structs </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/equal"> verbose_equal</a> </td><td> Message </td><td> bool </td><td> if true, a verbose equal method is generated for the message. This returns an error which describes the exact element which is not equal to the exact element in the other struct. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/stringer"> stringer</a> </td><td> Message </td><td> bool </td><td> if true, a String method is generated for the message. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/face">face</a> </td><td> Message </td><td> bool </td><td> if true, a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure. This interface contains getters for each of the fields in the struct. The specified struct is also generated with the getters. This allows it to satisfy its own face. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/description"> description</a> (beta) </td><td> Message </td><td> bool </td><td> if true, a Description method is generated for the message. </td><td> false </td></tr>
<tr><td> <a href="http://godoc.org/github.com/gogo/protobuf/plugin/populate"> populate</a> </td><td> Message </td><td> bool </td><td> if true, a `NewPopulated<MessageName>` function is generated. This is necessary for generated tests. </td><td> false </td></tr>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/enumstringer"> enum_stringer</a> (experimental) </td><td> Enum </td><td> bool </td><td> if true, a String method is generated for an Enum </td><td> false </td></tr>
</table>
Issues with Compare include:
* <a href="https://github.com/gogo/protobuf/issues/221">Oneof is not supported yet</a>
* <a href="https://github.com/gogo/protobuf/issues/230">Not all Well Known Types are supported yet</a>
* <a href="https://github.com/gogo/protobuf/issues/231">Maps are not supported</a>
#Peace of Mind
Test and Benchmark generation is done with the following extensions:
<table>
<tr><td><a href="http://godoc.org/github.com/gogo/protobuf/plugin/testgen">testgen</a> </td><td> Message </td><td> bool </td><td> if true, tests are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins </td><td> false </td></tr>
<tr><td> benchgen </td><td> Message </td><td> bool </td><td> if true, benchmarks are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins </td><td> false </td></tr>
</table>
# More Serialization Formats
Other serialization formats like xml and json typically use reflect to marshal and unmarshal structured data. Manipulating these structs into something other than the default Go requires editing tags. The following extensions provide ways of editing these tags for the generated protobuf structs.
<table>
<tr><td><a href="https://github.com/gogo/protobuf/blob/master/test/tags/tags.proto">jsontag</a> (beta) </td><td> Field </td><td> string </td><td> if set, the json tag value between the double quotes is replaced with this string </td><td> fieldname </td></tr>
<tr><td><a href="https://github.com/gogo/protobuf/blob/master/test/tags/tags.proto">moretags</a> (beta) </td><td> Field </td><td> string </td><td> if set, this string is appended to the tag string </td><td> empty </td></tr>
</table>
<a href="https://groups.google.com/forum/#!topic/gogoprotobuf/xmFnqAS6MIc">Here is a longer explanation of jsontag and moretags</a>
# File Options
Each of the boolean message and enum extensions also have a file extension:
* `marshaler_all`
* `sizer_all`
* `protosizer_all`
* `unmarshaler_all`
* `unsafe_marshaler_all`
* `unsafe_unmarshaler_all`
* `stable_marshaler_all`
* `goproto_enum_prefix_all`
* `goproto_getters_all`
* `goproto_stringer_all`
* `goproto_enum_stringer_all`
* `goproto_extensions_map_all`
* `goproto_unrecognized_all`
* `gostring_all`
* `onlyone_all`
* `equal_all`
* `compare_all`
* `verbose_equal_all`
* `stringer_all`
* `enum_stringer_all`
* `face_all`
* `description_all`
* `populate_all`
* `testgen_all`
* `benchgen_all`
* `enumdecl_all`
* `typedecl_all`
Each of these are the same as their Message Option counterparts, except they apply to all messages in the file. Their Message option counterparts can also be used to overwrite their effect.
# Tests
* The normal barrage of tests are run with: `make tests`
* A few weird tests: `make testall`
* Tests for compatibility with [golang/protobuf](https://github.com/golang/protobuf) are handled by a different project [harmonytests](https://github.com/gogo/harmonytests), since it requires goprotobuf.
* Cross version tests are made with [Travis CI](https://travis-ci.org/gogo/protobuf).
* GRPC Tests are also handled by a different project [grpctests](https://github.com/gogo/grpctests), since it depends on a lot of grpc libraries.
* Thanks to [go-fuzz](https://github.com/dvyukov/go-fuzz/) we have proper [fuzztests](https://github.com/gogo/fuzztests).

29
vendor/github.com/gogo/protobuf/install-protobuf.sh generated vendored Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -ex
die() {
echo "$@" >&2
exit 1
}
case "$PROTOBUF_VERSION" in
2*)
basename=protobuf-$PROTOBUF_VERSION
;;
3*)
basename=protobuf-cpp-$PROTOBUF_VERSION
;;
*)
die "unknown protobuf version: $PROTOBUF_VERSION"
;;
esac
cd /home/travis
wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz
tar xzf $basename.tar.gz
cd protobuf-$PROTOBUF_VERSION
./configure --prefix=/home/travis && make -j2 && make install

1
vendor/github.com/golang/groupcache/.gitignore generated vendored Normal file
View File

@ -0,0 +1 @@
*~

73
vendor/github.com/golang/groupcache/README.md generated vendored Normal file
View File

@ -0,0 +1,73 @@
# groupcache
## Summary
groupcache is a caching and cache-filling library, intended as a
replacement for memcached in many cases.
For API docs and examples, see http://godoc.org/github.com/golang/groupcache
## Comparison to memcached
### **Like memcached**, groupcache:
* shards by key to select which peer is responsible for that key
### **Unlike memcached**, groupcache:
* does not require running a separate set of servers, thus massively
reducing deployment/configuration pain. groupcache is a client
library as well as a server. It connects to its own peers.
* comes with a cache filling mechanism. Whereas memcached just says
"Sorry, cache miss", often resulting in a thundering herd of
database (or whatever) loads from an unbounded number of clients
(which has resulted in several fun outages), groupcache coordinates
cache fills such that only one load in one process of an entire
replicated set of processes populates the cache, then multiplexes
the loaded value to all callers.
* does not support versioned values. If key "foo" is value "bar",
key "foo" must always be "bar". There are neither cache expiration
times, nor explicit cache evictions. Thus there is also no CAS,
nor Increment/Decrement. This also means that groupcache....
* ... supports automatic mirroring of super-hot items to multiple
processes. This prevents memcached hot spotting where a machine's
CPU and/or NIC are overloaded by very popular keys/values.
* is currently only available for Go. It's very unlikely that I
(bradfitz@) will port the code to any other language.
## Loading process
In a nutshell, a groupcache lookup of **Get("foo")** looks like:
(On machine #5 of a set of N machines running the same code)
1. Is the value of "foo" in local memory because it's super hot? If so, use it.
2. Is the value of "foo" in local memory because peer #5 (the current
peer) is the owner of it? If so, use it.
3. Amongst all the peers in my set of N, am I the owner of the key
"foo"? (e.g. does it consistent hash to 5?) If so, load it. If
other callers come in, via the same process or via RPC requests
from peers, they block waiting for the load to finish and get the
same answer. If not, RPC to the peer that's the owner and get
the answer. If the RPC fails, just load it locally (still with
local dup suppression).
## Users
groupcache is in production use by dl.google.com (its original user),
parts of Blogger, parts of Google Code, parts of Google Fiber, parts
of Google production monitoring systems, etc.
## Presentations
See http://talks.golang.org/2013/oscon-dl.slide
## Help
Use the golang-nuts mailing list for any discussion or questions.

17
vendor/github.com/golang/protobuf/.gitignore generated vendored Normal file
View File

@ -0,0 +1,17 @@
.DS_Store
*.[568ao]
*.ao
*.so
*.pyc
._*
.nfs.*
[568a].out
*~
*.orig
core
_obj
_test
_testmain.go
# Conformance test output and transient files.
conformance/failing_tests.txt

30
vendor/github.com/golang/protobuf/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,30 @@
sudo: false
language: go
go:
- 1.6.x
- 1.10.x
- 1.x
install:
- go get -v -d -t github.com/golang/protobuf/...
- curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip
- unzip /tmp/protoc.zip -d "$HOME"/protoc
- mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf
env:
- PATH=$HOME/protoc/bin:$PATH
script:
- make all
- make regenerate
# TODO(tamird): When https://github.com/travis-ci/gimme/pull/130 is
# released, make this look for "1.x".
- if [[ "$TRAVIS_GO_VERSION" == 1.10* ]]; then
if [[ "$(git status --porcelain 2>&1)" != "" ]]; then
git status >&2;
git diff -a >&2;
exit 1;
fi;
echo "git status is clean.";
fi;
- make test

View File

@ -1,4 +1,7 @@
Go support for Protocol Buffers - Google's data interchange format
Copyright 2010 The Go Authors. All rights reserved.
https://github.com/golang/protobuf
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are

48
vendor/github.com/golang/protobuf/Makefile generated vendored Normal file
View File

@ -0,0 +1,48 @@
# Go support for Protocol Buffers - Google's data interchange format
#
# Copyright 2010 The Go Authors. All rights reserved.
# https://github.com/golang/protobuf
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
all: install
install:
go install ./proto ./jsonpb ./ptypes ./protoc-gen-go
test:
go test ./... ./protoc-gen-go/testdata
make -C conformance test
clean:
go clean ./...
nuke:
go clean -i ./...
regenerate:
./regenerate.sh

Some files were not shown because too many files have changed in this diff Show More