s3transport

package
v0.0.0-...-f373710 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

README

S3 Network Transport

This network transport facilitates the usage of AWS S3, and Amazon S3 Compatibility Object Storage. To use it, you will need:

  • A ram node
  • A bucket in your S3 compatible API Object Storage to store an object for the monotonic timer
  • A bucket in your S3 compatible API Object Storage for the content messages

How to Play

In order to use this transport, you need to configure several moving pieces. The New function for the S3 Transport is defined as func New(namespace string, region string, node api.Node, accessKey string, secretKey string, pubkey string, endpoint string, c2Bucket string, timeBucket string) and requires several arguments to properly instantiate. The arguments to New are as follows:

  • Namespace: The namespace of your tenancy
  • Region: The region in which S3, or compatible S3 API, will be used
  • Node: The type of node being used (ram node recommended)
  • AccessKey: Your S3 API access key
  • SecretKey: Your S3 API secret key
  • PubKey: The public routing key for the transport
  • EndPoint: The endpoint in which to use for S3. This matters if you will use a non-AWS S3 bucket and is used for S3 API compatibility.
  • C2Bucket: The bucket in which content messages are picked up and dropped off into
  • TimeBucket: The bucket in which the monotonic time counter is placed in
EndPoint

If you are not using AWS, you will need to define your S3 endpoint. Several cloud vendors have documentation of how to do this:

  1. GCP
  2. OCI

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromMap

func NewFromMap(node api.Node, t map[string]interface{}) api.Transport

NewFromMap : Makes a new instance of this transport module from a map of arguments (for deserialization support)

Types

type Module

type Module struct {
	Region     string
	Namespace  string
	AccessKey  string
	SecretKey  string
	EndPoint   string
	C2Bucket   string
	TimeBucket string

	RoutingPubKey bc.PubKey
	// contains filtered or unexported fields
}

Module : S3 Implementation of a Transport module

func New

func New(namespace string, region string, node api.Node, accessKey string, secretKey string, pubkey string, endpoint string, c2Bucket string, timeBucket string) *Module

New : Makes a new instance of this transport module

func (*Module) ByteLimit

func (s3obj *Module) ByteLimit() int64

ByteLimit - get limit on bytes per bundle for this transport

func (*Module) Listen

func (s3obj *Module) Listen(listen string, adminMode bool)

Listen : We do not need this for S3

func (*Module) MarshalJSON

func (s3obj *Module) MarshalJSON() (b []byte, e error)

MarshalJSON : Create a serialied representation of the config of this module

func (*Module) Name

func (s3obj *Module) Name() string

Name : Returns name of module

func (*Module) RPC

func (s3obj *Module) RPC(host string, method api.Action, args ...interface{}) (interface{}, error)

RPC : client interface

func (*Module) SetByteLimit

func (s3obj *Module) SetByteLimit(limit int64)

SetByteLimit - set limit on bytes per bundle for this transport

func (*Module) Stop

func (s3obj *Module) Stop()

Stop : Stops module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL