Documentation ¶
Index ¶
- Constants
- Variables
- type ContainerInfo
- type ProxyClient
- type ProxyDirectClient
- func (c *ProxyDirectClient) DeleteAccount(account string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) DeleteContainer(account string, container string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) DeleteObject(account string, container string, obj string, headers http.Header, ...) *http.Response
- func (c *ProxyDirectClient) GetAccount(account string, options map[string]string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) GetContainer(account string, container string, options map[string]string, ...) *http.Response
- func (c *ProxyDirectClient) GetContainerInfo(account string, container string, mc ring.MemcacheRing, ...) (*ContainerInfo, error)
- func (c *ProxyDirectClient) GetObject(account string, container string, obj string, headers http.Header, ...) *http.Response
- func (c *ProxyDirectClient) GrepObject(account string, container string, obj string, search string, ...) *http.Response
- func (c *ProxyDirectClient) HeadAccount(account string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) HeadContainer(account string, container string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) HeadObject(account string, container string, obj string, headers http.Header, ...) *http.Response
- func (c *ProxyDirectClient) ObjectRingFor(account string, container string, mc ring.MemcacheRing, ...) (ring.Ring, *http.Response)
- func (c *ProxyDirectClient) PostAccount(account string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) PostContainer(account string, container string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) PostObject(account string, container string, obj string, headers http.Header, ...) *http.Response
- func (c *ProxyDirectClient) PutAccount(account string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) PutContainer(account string, container string, headers http.Header) *http.Response
- func (c *ProxyDirectClient) PutObject(account string, container string, obj string, headers http.Header, ...) *http.Response
- func (c *ProxyDirectClient) SetContainerInfo(account, container string, mc ring.MemcacheRing, lc map[string]*ContainerInfo, ...) (*ContainerInfo, error)
Constants ¶
View Source
const PostQuorumTimeoutMs = 100
Variables ¶
View Source
var NilContainerInfo = &ContainerInfo{}
NilContainerInfo is useful for testing.
Functions ¶
This section is empty.
Types ¶
type ContainerInfo ¶
type ContainerInfo struct { ReadACL string WriteACL string SyncKey string ObjectCount int64 ObjectBytes int64 Metadata map[string]string SysMetadata map[string]string StoragePolicyIndex int }
ContainerInfo is persisted in memcache via JSON; so this needs to continue to have public fields.
type ProxyClient ¶
type ProxyClient interface { PutAccount(account string, headers http.Header) *http.Response PostAccount(account string, headers http.Header) *http.Response GetAccount(account string, options map[string]string, headers http.Header) *http.Response HeadAccount(account string, headers http.Header) *http.Response DeleteAccount(account string, headers http.Header) *http.Response PutContainer(account string, container string, headers http.Header) *http.Response PostContainer(account string, container string, headers http.Header) *http.Response GetContainer(account string, container string, options map[string]string, headers http.Header) *http.Response GetContainerInfo(account string, container string) (*ContainerInfo, error) SetContainerInfo(account string, container string, resp *http.Response) (*ContainerInfo, error) HeadContainer(account string, container string, headers http.Header) *http.Response DeleteContainer(account string, container string, headers http.Header) *http.Response PutObject(account string, container string, obj string, headers http.Header, src io.Reader) *http.Response PostObject(account string, container string, obj string, headers http.Header) *http.Response GetObject(account string, container string, obj string, headers http.Header) *http.Response HeadObject(account string, container string, obj string, headers http.Header) *http.Response DeleteObject(account string, container string, obj string, headers http.Header) *http.Response // ObjectRingFor returns the object ring for the given account/container or // a response as to why the ring could not be returned. ObjectRingFor(account string, container string) (ring.Ring, *http.Response) ContainerRing() ring.Ring }
ProxyClient is similar to github.com/troubling/nectar.Client except it also accepts an account parameter to its operations. This is meant to be used by the proxy server.
func NewProxyClient ¶
func NewProxyClient(pdc *ProxyDirectClient, mc ring.MemcacheRing, lc map[string]*ContainerInfo, logger srv.LowLevelLogger) ProxyClient
type ProxyDirectClient ¶
type ProxyDirectClient struct { AccountRing ring.Ring ContainerRing ring.Ring Logger srv.LowLevelLogger // contains filtered or unexported fields }
func NewProxyDirectClient ¶
func NewProxyDirectClient(policyList conf.PolicyList, cnf srv.ConfigLoader, logger srv.LowLevelLogger, certFile, keyFile string) (*ProxyDirectClient, error)
func (*ProxyDirectClient) DeleteAccount ¶
func (*ProxyDirectClient) DeleteContainer ¶
func (*ProxyDirectClient) DeleteObject ¶
func (c *ProxyDirectClient) DeleteObject(account string, container string, obj string, headers http.Header, mc ring.MemcacheRing, lc map[string]*ContainerInfo) *http.Response
func (*ProxyDirectClient) GetAccount ¶
func (*ProxyDirectClient) GetContainer ¶
func (*ProxyDirectClient) GetContainerInfo ¶
func (c *ProxyDirectClient) GetContainerInfo(account string, container string, mc ring.MemcacheRing, lc map[string]*ContainerInfo) (*ContainerInfo, error)
func (*ProxyDirectClient) GetObject ¶
func (c *ProxyDirectClient) GetObject(account string, container string, obj string, headers http.Header, mc ring.MemcacheRing, lc map[string]*ContainerInfo) *http.Response
func (*ProxyDirectClient) GrepObject ¶
func (c *ProxyDirectClient) GrepObject(account string, container string, obj string, search string, mc ring.MemcacheRing, lc map[string]*ContainerInfo) *http.Response
func (*ProxyDirectClient) HeadAccount ¶
func (*ProxyDirectClient) HeadContainer ¶
func (*ProxyDirectClient) HeadObject ¶
func (c *ProxyDirectClient) HeadObject(account string, container string, obj string, headers http.Header, mc ring.MemcacheRing, lc map[string]*ContainerInfo) *http.Response
func (*ProxyDirectClient) ObjectRingFor ¶
func (c *ProxyDirectClient) ObjectRingFor(account string, container string, mc ring.MemcacheRing, lc map[string]*ContainerInfo) (ring.Ring, *http.Response)
func (*ProxyDirectClient) PostAccount ¶
func (*ProxyDirectClient) PostContainer ¶
func (*ProxyDirectClient) PostObject ¶
func (c *ProxyDirectClient) PostObject(account string, container string, obj string, headers http.Header, mc ring.MemcacheRing, lc map[string]*ContainerInfo) *http.Response
func (*ProxyDirectClient) PutAccount ¶
func (*ProxyDirectClient) PutContainer ¶
func (*ProxyDirectClient) PutObject ¶
func (c *ProxyDirectClient) PutObject(account string, container string, obj string, headers http.Header, src io.Reader, mc ring.MemcacheRing, lc map[string]*ContainerInfo) *http.Response
func (*ProxyDirectClient) SetContainerInfo ¶
func (c *ProxyDirectClient) SetContainerInfo(account, container string, mc ring.MemcacheRing, lc map[string]*ContainerInfo, resp *http.Response) (*ContainerInfo, error)
Click to show internal directories.
Click to hide internal directories.