Documentation ¶
Index ¶
- Variables
- func KubeConfig(context *Context) clientcmd.ClientConfig
- func RawKubeConfig() (api.Config, error)
- type Config
- func (c *Config) ActiveContext() (string, *Context, error)
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetUserID() string
- func (m *Config) GetV1() *ConfigV1
- func (m *Config) GetV2() *ConfigV2
- func (m *Config) Marshal() (dAtA []byte, err error)
- func (m *Config) MarshalTo(dAtA []byte) (int, error)
- func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) Size() (n int)
- func (m *Config) String() string
- func (m *Config) Unmarshal(dAtA []byte) error
- func (c *Config) Write() error
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type ConfigV1
- func (*ConfigV1) Descriptor() ([]byte, []int)
- func (m *ConfigV1) GetActiveTransaction() string
- func (m *ConfigV1) GetPachdAddress() string
- func (m *ConfigV1) GetServerCAs() string
- func (m *ConfigV1) GetSessionToken() string
- func (m *ConfigV1) Marshal() (dAtA []byte, err error)
- func (m *ConfigV1) MarshalTo(dAtA []byte) (int, error)
- func (m *ConfigV1) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConfigV1) ProtoMessage()
- func (m *ConfigV1) Reset()
- func (m *ConfigV1) Size() (n int)
- func (m *ConfigV1) String() string
- func (m *ConfigV1) Unmarshal(dAtA []byte) error
- func (m *ConfigV1) XXX_DiscardUnknown()
- func (m *ConfigV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConfigV1) XXX_Merge(src proto.Message)
- func (m *ConfigV1) XXX_Size() int
- func (m *ConfigV1) XXX_Unmarshal(b []byte) error
- type ConfigV2
- func (*ConfigV2) Descriptor() ([]byte, []int)
- func (m *ConfigV2) GetActiveContext() string
- func (m *ConfigV2) GetContexts() map[string]*Context
- func (m *ConfigV2) GetMetrics() bool
- func (m *ConfigV2) Marshal() (dAtA []byte, err error)
- func (m *ConfigV2) MarshalTo(dAtA []byte) (int, error)
- func (m *ConfigV2) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConfigV2) ProtoMessage()
- func (m *ConfigV2) Reset()
- func (m *ConfigV2) Size() (n int)
- func (m *ConfigV2) String() string
- func (m *ConfigV2) Unmarshal(dAtA []byte) error
- func (m *ConfigV2) XXX_DiscardUnknown()
- func (m *ConfigV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConfigV2) XXX_Merge(src proto.Message)
- func (m *ConfigV2) XXX_Size() int
- func (m *ConfigV2) XXX_Unmarshal(b []byte) error
- type Context
- func (*Context) Descriptor() ([]byte, []int)
- func (m *Context) GetActiveTransaction() string
- func (m *Context) GetAuthInfo() string
- func (m *Context) GetClusterName() string
- func (m *Context) GetNamespace() string
- func (m *Context) GetPachdAddress() string
- func (m *Context) GetServerCAs() string
- func (m *Context) GetSessionToken() string
- func (m *Context) GetSource() ContextSource
- func (m *Context) Marshal() (dAtA []byte, err error)
- func (m *Context) MarshalTo(dAtA []byte) (int, error)
- func (m *Context) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Context) ProtoMessage()
- func (m *Context) Reset()
- func (m *Context) Size() (n int)
- func (m *Context) String() string
- func (m *Context) Unmarshal(dAtA []byte) error
- func (m *Context) XXX_DiscardUnknown()
- func (m *Context) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Context) XXX_Merge(src proto.Message)
- func (m *Context) XXX_Size() int
- func (m *Context) XXX_Unmarshal(b []byte) error
- type ContextSource
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group") )
var ContextSource_name = map[int32]string{
0: "NONE",
1: "CONFIG_V1",
2: "HUB",
3: "IMPORTED",
}
var ContextSource_value = map[string]int32{
"NONE": 0,
"CONFIG_V1": 1,
"HUB": 2,
"IMPORTED": 3,
}
Functions ¶
func KubeConfig ¶ added in v1.8.8
func KubeConfig(context *Context) clientcmd.ClientConfig
KubeConfig gets the kubernetes config
func RawKubeConfig ¶ added in v1.9.6
RawKubeConfig gets the "raw" kube config, e.g. without overrides
Types ¶
type Config ¶
type Config struct { UserID string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Configuration options. Exactly one of these fields should be set // (depending on which version of the config is being used) V1 *ConfigV1 `protobuf:"bytes,2,opt,name=v1,proto3" json:"v1,omitempty"` V2 *ConfigV2 `protobuf:"bytes,3,opt,name=v2,proto3" json:"v2,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Config specifies the pachyderm config that is read and interpreted by the pachctl command-line tool. Right now, this is stored at $HOME/.pachyderm/config.
Different versions of the pachyderm config are specified as subfields of this message (this allows us to make significant changes to the config structure without breaking existing users by defining a new config version).
DO NOT change or remove field numbers from this proto, otherwise ALL pachyderm user configs will fail to parse.
func Read ¶
Read loads the Pachyderm config on this machine. If an existing configuration cannot be found, it sets up the defaults. Read returns a nil Config if and only if it returns a non-nil error.
func (*Config) ActiveContext ¶ added in v1.8.8
ActiveContext gets the active context in the config
func (*Config) Descriptor ¶
func (*Config) MarshalToSizedBuffer ¶ added in v1.8.8
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) Write ¶ added in v1.5.0
Write writes the configuration in 'c' to this machine's Pachyderm config file.
func (*Config) XXX_DiscardUnknown ¶ added in v1.7.12
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶ added in v1.7.12
func (*Config) XXX_Unmarshal ¶ added in v1.7.12
type ConfigV1 ¶ added in v1.5.0
type ConfigV1 struct { // A host:port pointing pachd at a pachyderm cluster. PachdAddress string `protobuf:"bytes,2,opt,name=pachd_address,json=pachdAddress,proto3" json:"pachd_address,omitempty"` // Trusted root certificates (overrides installed certificates), formatted // as base64-encoded PEM ServerCAs string `protobuf:"bytes,3,opt,name=server_cas,json=serverCas,proto3" json:"server_cas,omitempty"` // A secret token identifying the current pachctl user within their // pachyderm cluster. This is included in all RPCs sent by pachctl, and used // to determine if pachctl actions are authorized. SessionToken string `protobuf:"bytes,1,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"` // The currently active transaction for batching together pachctl commands. // This can be set or cleared via many of the `pachctl * transaction` commands. // This is the ID of the transaction object stored in the pachyderm etcd. ActiveTransaction string `protobuf:"bytes,4,opt,name=active_transaction,json=activeTransaction,proto3" json:"active_transaction,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ConfigV1 specifies v1 of the pachyderm config (June 30 2017 - June 2019) DO NOT change or remove field numbers from this proto, as if you do, v1 user configs will become unparseable.
func (*ConfigV1) Descriptor ¶ added in v1.5.0
func (*ConfigV1) GetActiveTransaction ¶ added in v1.8.8
func (*ConfigV1) GetPachdAddress ¶ added in v1.5.0
func (*ConfigV1) GetServerCAs ¶ added in v1.7.4
func (*ConfigV1) GetSessionToken ¶ added in v1.5.1
func (*ConfigV1) MarshalToSizedBuffer ¶ added in v1.8.8
func (*ConfigV1) ProtoMessage ¶ added in v1.5.0
func (*ConfigV1) ProtoMessage()
func (*ConfigV1) XXX_DiscardUnknown ¶ added in v1.7.12
func (m *ConfigV1) XXX_DiscardUnknown()
func (*ConfigV1) XXX_Marshal ¶ added in v1.7.12
func (*ConfigV1) XXX_Unmarshal ¶ added in v1.7.12
type ConfigV2 ¶ added in v1.8.8
type ConfigV2 struct { ActiveContext string `protobuf:"bytes,1,opt,name=active_context,json=activeContext,proto3" json:"active_context,omitempty"` Contexts map[string]*Context `` /* 157-byte string literal not displayed */ Metrics bool `protobuf:"varint,3,opt,name=metrics,proto3" json:"metrics,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ConfigV2 specifies v2 of the pachyderm config (June 2019 - present)
func (*ConfigV2) Descriptor ¶ added in v1.8.8
func (*ConfigV2) GetActiveContext ¶ added in v1.8.8
func (*ConfigV2) GetContexts ¶ added in v1.8.8
func (*ConfigV2) GetMetrics ¶ added in v1.8.8
func (*ConfigV2) MarshalToSizedBuffer ¶ added in v1.8.8
func (*ConfigV2) ProtoMessage ¶ added in v1.8.8
func (*ConfigV2) ProtoMessage()
func (*ConfigV2) XXX_DiscardUnknown ¶ added in v1.8.8
func (m *ConfigV2) XXX_DiscardUnknown()
func (*ConfigV2) XXX_Marshal ¶ added in v1.8.8
func (*ConfigV2) XXX_Unmarshal ¶ added in v1.8.8
type Context ¶ added in v1.8.8
type Context struct { // Where this context came from Source ContextSource `protobuf:"varint,1,opt,name=source,proto3,enum=config.ContextSource" json:"source,omitempty"` // The hostname or IP address pointing pachd at a pachyderm cluster. PachdAddress string `protobuf:"bytes,2,opt,name=pachd_address,json=pachdAddress,proto3" json:"pachd_address,omitempty"` // Trusted root certificates (overrides installed certificates), formatted // as base64-encoded PEM ServerCAs string `protobuf:"bytes,3,opt,name=server_cas,json=serverCas,proto3" json:"server_cas,omitempty"` // A secret token identifying the current pachctl user within their // pachyderm cluster. This is included in all RPCs sent by pachctl, and used // to determine if pachctl actions are authorized. SessionToken string `protobuf:"bytes,4,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"` // The currently active transaction for batching together pachctl commands. // This can be set or cleared via many of the `pachctl * transaction` commands. // This is the ID of the transaction object stored in the pachyderm etcd. ActiveTransaction string `protobuf:"bytes,5,opt,name=active_transaction,json=activeTransaction,proto3" json:"active_transaction,omitempty"` // The k8s cluster name - used to construct a k8s context ClusterName string `protobuf:"bytes,6,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"` // The k8s auth info - used to construct a k8s context AuthInfo string `protobuf:"bytes,7,opt,name=auth_info,json=authInfo,proto3" json:"auth_info,omitempty"` // The k8s namespace - used to construct a k8s context Namespace string `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Context) Descriptor ¶ added in v1.8.8
func (*Context) GetActiveTransaction ¶ added in v1.8.8
func (*Context) GetAuthInfo ¶ added in v1.9.5
func (*Context) GetClusterName ¶ added in v1.9.5
func (*Context) GetNamespace ¶ added in v1.9.5
func (*Context) GetPachdAddress ¶ added in v1.8.8
func (*Context) GetServerCAs ¶ added in v1.8.8
func (*Context) GetSessionToken ¶ added in v1.8.8
func (*Context) GetSource ¶ added in v1.8.8
func (m *Context) GetSource() ContextSource
func (*Context) MarshalToSizedBuffer ¶ added in v1.8.8
func (*Context) ProtoMessage ¶ added in v1.8.8
func (*Context) ProtoMessage()
func (*Context) XXX_DiscardUnknown ¶ added in v1.8.8
func (m *Context) XXX_DiscardUnknown()
func (*Context) XXX_Marshal ¶ added in v1.8.8
func (*Context) XXX_Unmarshal ¶ added in v1.8.8
type ContextSource ¶ added in v1.8.8
type ContextSource int32
const ( ContextSource_NONE ContextSource = 0 ContextSource_CONFIG_V1 ContextSource = 1 ContextSource_HUB ContextSource = 2 ContextSource_IMPORTED ContextSource = 3 )
func (ContextSource) EnumDescriptor ¶ added in v1.8.8
func (ContextSource) EnumDescriptor() ([]byte, []int)
func (ContextSource) String ¶ added in v1.8.8
func (x ContextSource) String() string