Documentation
¶
Index ¶
- func BuildId() string
- func DecodeHeaders(b []byte) (map[string][][]byte, error)
- func ErrorCheck(e *C.err_Err) error
- func MadpackDecode(preshared *madpack.Index, b []byte) (map[string]interface{}, error)
- func MadpackEncode(preshared *madpack.Index, m map[string]interface{}) ([]byte, error)
- func MakeConnectFn(v interface{}) C.carrier_connect_connect_t
- func MakeDisconnectFn(v interface{}) C.carrier_connect_disconnect_t
- func PresharedIndexDiscovery() *madpack.Index
- func PresharedIndexFrom(b []byte) *madpack.Index
- func PresharedIndexSubscribe() *madpack.Index
- func PresharedIndexTrace() *madpack.Index
- type Address
- type Alias
- type Async
- type Channel
- type Conduit
- type ConduitConfig
- type ConnectOpt
- type Delete
- type Endpoint
- func (self *Endpoint) Bootstrap() error
- func (self *Endpoint) Close()
- func (self *Endpoint) ClusterDoNotMove()
- func (self *Endpoint) ClusterMoveTarget(target *Target)
- func (self *Endpoint) CoDelete(destructor Delete)
- func (self *Endpoint) Delete()
- func (self *Endpoint) Link() error
- func (self *Endpoint) Shutdown() error
- func (self *Endpoint) WaitEvent() (bool, error)
- func (self *Endpoint) Wakeup() error
- type Error
- type Event
- type EventType
- type IConnect
- type Identity
- type IdentityKit
- type NetTraceResult
- type OpenStreamOptions
- type Record
- type Secret
- type SecretKit
- type Signature
- type Stream
- type Subscriber
- type Target
- type Vault
- func (self *Vault) AddAuthorization(addme *Identity, path string) error
- func (self *Vault) Clone() *Vault
- func (self *Vault) DelAuthorization(addme *Identity, path string) error
- func (self *Vault) Delete()
- func (self *Vault) GetIdentity() *Identity
- func (self *Vault) GetIdentityKit() *IdentityKit
- func (self *Vault) GetNetwork() *Address
- func (self *Vault) GetSecretKit() *SecretKit
- func (self *Vault) ListAuthorizations(cb func(*Identity, string)) error
- func (self *Vault) SetNetwork(join *Secret) error
- func (self *Vault) Take() C.carrier_vault_Vault
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorCheck ¶
func MadpackDecode ¶
func MadpackEncode ¶
func MakeConnectFn ¶
func MakeConnectFn(v interface{}) C.carrier_connect_connect_t
func MakeDisconnectFn ¶
func MakeDisconnectFn(v interface{}) C.carrier_connect_disconnect_t
func PresharedIndexDiscovery ¶
func PresharedIndexDiscovery() *madpack.Index
func PresharedIndexFrom ¶
func PresharedIndexFrom(b []byte) *madpack.Index
func PresharedIndexSubscribe ¶
func PresharedIndexSubscribe() *madpack.Index
func PresharedIndexTrace ¶
func PresharedIndexTrace() *madpack.Index
Types ¶
type Address ¶
type Address [32]byte // type 6
func AddressFromString ¶
func (*Address) CPtr ¶
func (self *Address) CPtr() *C.carrier_identity_Address
type Channel ¶
type Channel struct { Revision uint32 // contains filtered or unexported fields }
func Connect ¶
func Connect(target_str string, opt ...ConnectOpt) (*Channel, error)
link and connect to target, return the target channel
func Link ¶
func Link(target_str string, opt ...ConnectOpt) (*Channel, error)
link but dont connect. return the broker channel
type Conduit ¶
type Conduit struct {
// contains filtered or unexported fields
}
broadcast endpoint, a link to all carrier brokers
func StartConduit ¶
func StartConduit(opts ...ConduitConfig) (*Conduit, error)
func (*Conduit) NetTrace ¶
func (self *Conduit) NetTrace() (*NetTraceResult, error)
func (*Conduit) Subscribe ¶
func (self *Conduit) Subscribe() (*Subscriber, error)
type ConduitConfig ¶
type ConduitConfig struct {
SecretKit *SecretKit
}
type ConnectOpt ¶
type ConnectOpt struct {
Vault *Vault
}
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
low level endpoint, a link to a single carrier broker contains a single threaded eventloop and is not thread safe
func (*Endpoint) ClusterDoNotMove ¶
func (self *Endpoint) ClusterDoNotMove()
request to be linked static to the first broker in the list
func (*Endpoint) ClusterMoveTarget ¶
request to be linked to same cluster node as target
type EventType ¶
type EventType string
const ( PublishEvent EventType = "Publish" UnpublishEvent = "Unpublish" )
type IConnect ¶
type IConnect struct {
// contains filtered or unexported fields
}
func (*IConnect) OnConnect ¶
func (self *IConnect) OnConnect(f func(self *C.carrier_connect_Connect, cha *C.carrier_channel_Channel))
func (*IConnect) OnDisconnect ¶
func (self *IConnect) OnDisconnect(f func(self *C.carrier_connect_Connect, ep *C.carrier_endpoint_Endpoint))
type Identity ¶
type Identity [32]byte // type 9
func IdentityFromSecret ¶
func IdentityFromString ¶
func (*Identity) CPtr ¶
func (self *Identity) CPtr() *C.carrier_identity_Identity
type IdentityKit ¶
func (*IdentityKit) CPtr ¶
func (self *IdentityKit) CPtr() *C.carrier_identity_IdentityKit
func (*IdentityKit) String ¶
func (self *IdentityKit) String() string
type NetTraceResult ¶
type OpenStreamOptions ¶
type Secret ¶
type Secret [32]byte // type 3
func CreateSecret ¶
func SecretFromString ¶
func (*Secret) CPtr ¶
func (self *Secret) CPtr() *C.carrier_identity_Secret
type SecretKit ¶
func SecretKitFromString ¶
func (*SecretKit) CPtr ¶
func (self *SecretKit) CPtr() *C.carrier_identity_SecretKit
type Stream ¶
type Stream struct { ResponseHeaders map[string][][]byte Index *madpack.Index Rx chan []byte Tx chan []byte Death chan bool // contains filtered or unexported fields }
func (*Stream) ReceiveRaw ¶
type Subscriber ¶
type Subscriber struct {
EventRx chan Event
}
type Target ¶
type Target struct {
// contains filtered or unexported fields
}
func TargetFromString ¶
func (*Target) CPtr ¶
func (self *Target) CPtr() *C.carrier_identity_Target
type Vault ¶
type Vault struct {
// contains filtered or unexported fields
}
func DefaultVault ¶
func VaultFromSecretKit ¶
func (*Vault) AddAuthorization ¶
func (*Vault) DelAuthorization ¶
func (*Vault) GetIdentity ¶
func (*Vault) GetIdentityKit ¶
func (self *Vault) GetIdentityKit() *IdentityKit
func (*Vault) GetNetwork ¶
func (*Vault) GetSecretKit ¶
func (*Vault) ListAuthorizations ¶
func (*Vault) SetNetwork ¶
func (*Vault) Take ¶
func (self *Vault) Take() C.carrier_vault_Vault
/ take ownership of the vault back to C
Source Files
¶
Click to show internal directories.
Click to hide internal directories.