Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/vendor/github.com/ncw/swift
renovate[bot] c8432887d3
fix(deps): update module github.com/ncw/swift/v2 to v2.0.3 (#14356)
8 months ago
..
v2 fix(deps): update module github.com/ncw/swift/v2 to v2.0.3 (#14356) 8 months ago
.gitignore Update cortex to latest. (#1982) 5 years ago
.travis.yml Revert "Revert "Update Thanos dependency to latest version"" (#7372) 3 years ago
COPYING Update cortex to latest. (#1982) 5 years ago
README.md Cortex update pre 1.7 (#3215) 4 years ago
auth.go Update cortex to latest. (#1982) 5 years ago
auth_v3.go Update cortex to latest. (#1982) 5 years ago
compatibility_1_0.go Update cortex to latest. (#1982) 5 years ago
compatibility_1_1.go Update cortex to latest. (#1982) 5 years ago
compatibility_1_6.go Update cortex to latest. (#1982) 5 years ago
compatibility_not_1_6.go Update cortex to latest. (#1982) 5 years ago
dlo.go Update cortex to latest. (#1982) 5 years ago
doc.go Update cortex to latest. (#1982) 5 years ago
largeobjects.go Cortex update pre 1.7 (#3215) 4 years ago
meta.go Update cortex to latest. (#1982) 5 years ago
notes.txt Update cortex to latest. (#1982) 5 years ago
slo.go Update cortex to latest. (#1982) 5 years ago
swift.go Cortex update pre 1.7 (#3215) 4 years ago
timeout_reader.go Update cortex to latest. (#1982) 5 years ago
travis_realserver.sh Update cortex to latest. (#1982) 5 years ago
watchdog_reader.go Update cortex to latest. (#1982) 5 years ago

README.md

Swift

This package provides an easy to use library for interfacing with Swift / Openstack Object Storage / Rackspace cloud files from the Go Language

See here for package docs

http://godoc.org/github.com/ncw/swift

Build Status GoDoc

Install

Use go to install the library

go get github.com/ncw/swift

Usage

See here for full package docs

Here is a short example from the docs

import "github.com/ncw/swift"

// Create a connection
c := swift.Connection{
    UserName: "user",
    ApiKey:   "key",
    AuthUrl:  "auth_url",
    Domain:   "domain",  // Name of the domain (v3 auth only)
    Tenant:   "tenant",  // Name of the tenant (v2 auth only)
}
// Authenticate
err := c.Authenticate()
if err != nil {
    panic(err)
}
// List all the containers
containers, err := c.ContainerNames(nil)
fmt.Println(containers)
// etc...

Additions

The rs sub project contains a wrapper for the Rackspace specific CDN Management interface.

Testing

To run the tests you can either use an embedded fake Swift server either use a real Openstack Swift server or a Rackspace Cloud files account.

When using a real Swift server, you need to set these environment variables before running the tests

export SWIFT_API_USER='user'
export SWIFT_API_KEY='key'
export SWIFT_AUTH_URL='https://url.of.auth.server/v1.0'

And optionally these if using v2 authentication

export SWIFT_TENANT='TenantName'
export SWIFT_TENANT_ID='TenantId'

And optionally these if using v3 authentication

export SWIFT_TENANT='TenantName'
export SWIFT_TENANT_ID='TenantId'
export SWIFT_API_DOMAIN_ID='domain id'
export SWIFT_API_DOMAIN='domain name'

And optionally these if using v3 trust

export SWIFT_TRUST_ID='TrustId'

And optionally this if you want to skip server certificate validation

export SWIFT_AUTH_INSECURE=1

And optionally this to configure the connect channel timeout, in seconds

export SWIFT_CONNECTION_CHANNEL_TIMEOUT=60

And optionally this to configure the data channel timeout, in seconds

export SWIFT_DATA_CHANNEL_TIMEOUT=60

Then run the tests with go test

License

This is free software under the terms of MIT license (check COPYING file included in this package).

Contact and support

The project website is at:

There you can file bug reports, ask for help or contribute patches.

Authors

Contributors