pachyderm 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,53 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: client/pps/pps.proto for package 'pps'
3
+
4
+ require 'grpc'
5
+ require 'client/pps/pps_pb'
6
+
7
+ module Pps
8
+ module API
9
+ class Service
10
+
11
+ include GRPC::GenericService
12
+
13
+ self.marshal_class_method = :encode
14
+ self.unmarshal_class_method = :decode
15
+ self.service_name = 'pps.API'
16
+
17
+ rpc :CreateJob, CreateJobRequest, Job
18
+ rpc :InspectJob, InspectJobRequest, JobInfo
19
+ # ListJob returns information about current and past Pachyderm jobs. This is
20
+ # deprecated in favor of ListJobStream
21
+ rpc :ListJob, ListJobRequest, JobInfos
22
+ # ListJobStream returns information about current and past Pachyderm jobs.
23
+ rpc :ListJobStream, ListJobRequest, stream(JobInfo)
24
+ rpc :FlushJob, FlushJobRequest, stream(JobInfo)
25
+ rpc :DeleteJob, DeleteJobRequest, Google::Protobuf::Empty
26
+ rpc :StopJob, StopJobRequest, Google::Protobuf::Empty
27
+ rpc :InspectDatum, InspectDatumRequest, DatumInfo
28
+ # ListDatum returns information about each datum fed to a Pachyderm job. This
29
+ # is deprecated in favor of ListDatumStream
30
+ rpc :ListDatum, ListDatumRequest, ListDatumResponse
31
+ # ListDatumStream returns information about each datum fed to a Pachyderm job
32
+ rpc :ListDatumStream, ListDatumRequest, stream(ListDatumStreamResponse)
33
+ rpc :RestartDatum, RestartDatumRequest, Google::Protobuf::Empty
34
+ rpc :CreatePipeline, CreatePipelineRequest, Google::Protobuf::Empty
35
+ rpc :InspectPipeline, InspectPipelineRequest, PipelineInfo
36
+ rpc :ListPipeline, ListPipelineRequest, PipelineInfos
37
+ rpc :DeletePipeline, DeletePipelineRequest, Google::Protobuf::Empty
38
+ rpc :StartPipeline, StartPipelineRequest, Google::Protobuf::Empty
39
+ rpc :StopPipeline, StopPipelineRequest, Google::Protobuf::Empty
40
+ rpc :RerunPipeline, RerunPipelineRequest, Google::Protobuf::Empty
41
+ # DeleteAll deletes everything
42
+ rpc :DeleteAll, Google::Protobuf::Empty, Google::Protobuf::Empty
43
+ rpc :GetLogs, GetLogsRequest, stream(LogMessage)
44
+ # Garbage collection
45
+ rpc :GarbageCollect, GarbageCollectRequest, GarbageCollectResponse
46
+ # An internal call that causes PPS to put itself into an auth-enabled state
47
+ # (all pipeline have tokens, correct permissions, etcd)
48
+ rpc :ActivateAuth, ActivateAuthRequest, ActivateAuthResponse
49
+ end
50
+
51
+ Stub = Service.rpc_stub_class
52
+ end
53
+ end
@@ -0,0 +1,18 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: client/version/versionpb/version.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/empty_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "versionpb.Version" do
9
+ optional :major, :uint32, 1
10
+ optional :minor, :uint32, 2
11
+ optional :micro, :uint32, 3
12
+ optional :additional, :string, 4
13
+ end
14
+ end
15
+
16
+ module Versionpb
17
+ Version = Google::Protobuf::DescriptorPool.generated_pool.lookup("versionpb.Version").msgclass
18
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: client/version/versionpb/version.proto for package 'versionpb'
3
+
4
+ require 'grpc'
5
+ require 'client/version/versionpb/version_pb'
6
+
7
+ module Versionpb
8
+ module API
9
+ class Service
10
+
11
+ include GRPC::GenericService
12
+
13
+ self.marshal_class_method = :encode
14
+ self.unmarshal_class_method = :decode
15
+ self.service_name = 'versionpb.API'
16
+
17
+ rpc :GetVersion, Google::Protobuf::Empty, Version
18
+ end
19
+
20
+ Stub = Service.rpc_stub_class
21
+ end
22
+ end
data/lib/pachyderm.rb ADDED
@@ -0,0 +1,29 @@
1
+ require 'client/pfs/pfs_pb'
2
+ require 'client/pfs/pfs_services_pb'
3
+ require 'client/version/versionpb/version_pb'
4
+ require 'client/version/versionpb/version_services_pb'
5
+ require 'client/auth/auth_pb'
6
+ require 'client/auth/auth_services_pb'
7
+
8
+ module Pachyderm
9
+ class << self
10
+ def LoggedIn?(token)
11
+ raise Exception.new("user token required") if token.nil?
12
+ client = Auth::API::Stub.new($address, :this_channel_is_insecure)
13
+ begin
14
+ res = client.whoami(Auth::WhoAmIRequest.new, metadata(token))
15
+ puts "logged in as #{res.username}, admin? #{res.is_admin}\n"
16
+ rescue GRPC::Unauthenticated
17
+ return false
18
+ end
19
+ return true
20
+ end
21
+
22
+ def metadata(token)
23
+ # The 'authn-token' is a keyname hardcoded at:
24
+ # https://github.com/pachyderm/pachyderm/blob/master/src/client/auth/auth.go#L14
25
+ # TODO - as part of the 'make sync' build task, pull in this value
26
+ {:metadata => {'authn-token' => token}}
27
+ end
28
+ end
29
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pachyderm
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.7.3
5
+ platform: ruby
6
+ authors:
7
+ - Joe Doliner
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-05-31 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Client library for interacting with a Pachyderm cluster
14
+ email: jdoliner@pachyderm.io
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/client/admin/admin_pb.rb
20
+ - lib/client/admin/admin_services_pb.rb
21
+ - lib/client/auth/auth_pb.rb
22
+ - lib/client/auth/auth_services_pb.rb
23
+ - lib/client/deploy/deploy_pb.rb
24
+ - lib/client/deploy/deploy_services_pb.rb
25
+ - lib/client/enterprise/enterprise_pb.rb
26
+ - lib/client/enterprise/enterprise_services_pb.rb
27
+ - lib/client/health/health_pb.rb
28
+ - lib/client/health/health_services_pb.rb
29
+ - lib/client/pfs/pfs_pb.rb
30
+ - lib/client/pfs/pfs_services_pb.rb
31
+ - lib/client/pkg/config/config_pb.rb
32
+ - lib/client/pkg/shard/shard_pb.rb
33
+ - lib/client/pps/pps_pb.rb
34
+ - lib/client/pps/pps_services_pb.rb
35
+ - lib/client/version/versionpb/version_pb.rb
36
+ - lib/client/version/versionpb/version_services_pb.rb
37
+ - lib/pachyderm.rb
38
+ homepage: http://rubygems.org/gems/pachyderm
39
+ licenses:
40
+ - Apache 2.0
41
+ metadata: {}
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project:
58
+ rubygems_version: 2.6.11
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Client library for interacting with a Pachyderm cluster
62
+ test_files: []