Documentation
¶
Index ¶
- Variables
- func NewEntClient(ctx context.Context, c EntConfig) *ent.Client
- type AMQPChannel
- type AMQPClientConfig
- type AMQPConnection
- type BlockingClient
- type Closeable
- type ComputeClients
- type ComputeServiceClient
- type ComputeServiceClientProvider
- type EntConfig
- type FileServiceClient
- type FileServiceClientProvider
- type HostConfig
- type Object
- type ObjectStoreClient
- type ObjectStoreClientProvider
- type PrepareServiceClient
- type PrepareServiceClientProvider
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingAuthority = errors.New("unable to determine uri authority ([user@]host[:port]) for network-based scheme") ErrMissingScheme = errors.New("unable to determine uri scheme") ErrRegFsNotFound = errors.New("no matching registered filesystem found") ErrBlankURI = errors.New("uri is blank") )
Functions ¶
Types ¶
type AMQPChannel ¶
type AMQPChannel interface { // Close will cleanly shutdown the channel Close() error // Consume will continuously put queue items on the channel. // It is required to call delivery.Ack when it has been // successfully processed, or delivery.Nack when it fails. // Ignoring this will cause data to build up on the server. Consume() (<-chan amqp.Delivery, error) // Push will push data onto the queue, and wait for a confirm. // If no confirms are received until within the resendTimeout, // it continuously re-sends messages until a confirm is received. // This will block until the server sends a confirm. Errors are // only returned if the push action itself fails. Push(data []byte) error // returns true when the channel is ready for consuming or pushing IsReady() bool // NotifyClose registers a listener for when the server sends a // channel exception in the form of a Channel.Close method. Channel // exceptions will only be broadcast to listeners on this channel. // // The chan provided will be closed when the Channel is closed and // on a graceful close, no error will be sent. // // In case of a non graceful close the error will be notified // synchronously by the library so that it will be necessary to // consume the Channel from the caller in order to avoid deadlocks NotifyClose(c chan *amqp.Error) (chan *amqp.Error, error) }
type AMQPClientConfig ¶
AMQPClientConfig is the information need to connect to an AMQP server
type AMQPConnection ¶
type AMQPConnection interface { // Close will cleanly shutdown the connection and any existing channels Close() error // Gets a new channel on the connection, and initializes a queue // This channel will close and re-init itself if an error occurs GetNewChannel(queueName string) AMQPChannel }
wraps an AMQP connection
func NewAMQPConnection ¶
func NewAMQPConnection(config AMQPClientConfig) AMQPConnection
NewAMQPConnectiont creates a new AMQPConnection instance, and automatically attempts to connect to the server.
type BlockingClient ¶
type BlockingClient interface { UnaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (response interface{}, err error) StreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error }
BlockingClient blocks requests
func NewBlockingClient ¶
func NewBlockingClient() BlockingClient
NewBlockingClient creates a new blocking client designed for GRPC Interceptors
type ComputeClients ¶
type ComputeClients interface { NewFileServiceClient(ctx context.Context) FileServiceClient NewPrepareServiceClient(ctx context.Context) PrepareServiceClient NewComputeServiceClient(ctx context.Context) ComputeServiceClient }
func CreateComputeClients ¶
func CreateComputeClients(fileServiceConfig *HostConfig, prepareServiceConfig *HostConfig, computeServiceConfig *HostConfig) ComputeClients
CreateComputeClients initializes the computeClients
type ComputeServiceClient ¶
type ComputeServiceClient interface { Closeable v1alpha.ComputeServiceClient }
ComputeServiceClient is a Closable ComputeService client
func NewComputeServiceClient ¶
func NewComputeServiceClient(conn *grpc.ClientConn) ComputeServiceClient
NewComputeServiceClient creates a new ComputeServiceClient from a gRPC connection
type ComputeServiceClientProvider ¶
type ComputeServiceClientProvider func(ctx context.Context) ComputeServiceClient
ComputeServiceClientProvider creates ComputeServiceClients
type EntConfig ¶
type EntConfig struct {
// contains filtered or unexported fields
}
EntConfig is the information need to connect to a database
func NewEntConfig ¶
func (EntConfig) DataSourceName ¶
func (EntConfig) DriverName ¶
type FileServiceClient ¶
type FileServiceClient interface { Closeable v1alpha.FileServiceClient }
FileServiceClient is a Closable FileService client
func NewFileServiceClient ¶
func NewFileServiceClient(conn *grpc.ClientConn) FileServiceClient
NewFileServiceClient creates a new FileServiceClient from a gRPC connection
type FileServiceClientProvider ¶
type FileServiceClientProvider func(ctx context.Context) FileServiceClient
FileServiceClientProvider creates FileServiceClients
type HostConfig ¶
HostConfig holds the data needed to connect to a particular grpc server
type ObjectStoreClient ¶
type ObjectStoreClient interface { // copies an object into our object store // returns the URI of the object in our object store CopyObjectIn(ctx context.Context, inputFile string, toPath string) (Object, error) // deletes the provided object from our store DeleteObject(ctx context.Context, object Object) error // deletes all objects under the provided path from our object store DeleteObjects(ctx context.Context, path string) error // generates a presigned URL to download an object from our store. // Note the signing step will be skipped when the object-store-type is `local` GetPresignedDownloadURL(ctx context.Context, URI string) (string, error) // gets an MD5 hash or equivalent identifier for fileURI GetObjectIdentifier(ctx context.Context, fileURI string) (*string, error) // returns the absolute URI of a path inside our object store GetDataPathURI(path string) string // true if the URI exists and is accessible, otherwise returns error URIExists(ctx context.Context, URI string) (bool, error) }
ObjectStoreClient is a Closable FileSystem client
func NewObjectStoreClient ¶
func NewObjectStoreClient(env string, objectStoreType string, bucket string, path string, endpoint string, disableSSL bool, forcePathStyle bool) ObjectStoreClient
NewObjectStoreClient creates a new ObjectStoreClient
type ObjectStoreClientProvider ¶
type ObjectStoreClientProvider func(ctx context.Context) ObjectStoreClient
ObjectStoreClientProvider creates ObjectStoreClients
type PrepareServiceClient ¶
type PrepareServiceClient interface { Closeable v1alpha.PreparationServiceClient }
PrepareServiceClient is a Closable PrepareService client
func NewPrepareServiceClient ¶
func NewPrepareServiceClient(conn *grpc.ClientConn) PrepareServiceClient
NewPrepareServiceClient creates a new PrepareServiceClient from a gRPC connection
type PrepareServiceClientProvider ¶
type PrepareServiceClientProvider func(ctx context.Context) PrepareServiceClient
PrepareServiceClientProvider creates PrepareServiceClients