Documentation ¶
Index ¶
- type Cache
- type Conf
- type Http
- type Logger
- type Message
- func (m Message) AddressTrytes() string
- func (m Message) BranchTrytes() string
- func (m Message) BundleTrytes() string
- func (m *Message) Debug() string
- func (m Message) NonceTrytes() string
- func (m Message) ObsoleteTagTrytes() string
- func (m Message) Store(tangle storage.Store) error
- func (m Message) TagTrytes() string
- func (m *Message) TrailerHash() []int8
- func (m Message) TrunkTrytes() string
- func (m *Message) TxDigest() []byte
- func (m Message) TxDigestHex() string
- func (m *Message) TxHash() []int8
- func (m Message) Validate(minWeightMag int) error
- type MultiString
- type Node
- type UDP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is an LRU cache, safe for concurrent access.
func (*Cache) Add ¶
func (c *Cache) Add(key, value interface{})
Add adds the provided key and value to the cache, evicting an old item if necessary.
func (*Cache) Get ¶
Get fetches the key's value from the cache. The ok result will be true if the item was found.
func (*Cache) RemoveOldest ¶
func (c *Cache) RemoveOldest() (key, value interface{})
RemoveOldest removes the oldest item in the cache and returns its key and value. If the cache is empty, the empty string and nil are returned.
type Logger ¶
type Logger interface { Printf(format string, v ...interface{}) Println(v ...interface{}) }
func NewNullLogger ¶
func NewNullLogger() Logger
type Message ¶
type Message struct { TxBytes []byte // Raw transaction bytes TxTrits []int8 // Raw transaction trits Address []int8 // Address trits Trunk []int8 // Trunk address trits Branch []int8 // Branch address trits Bundle []int8 // Bundle address trits Tag []int8 // Tag ObsoleteTag []int8 Nonce []int8 // Nonce ValueTrailer []int8 // Trits after usable value AttachmentTs int64 // Attachment timestamp AttachmentTsUpper int64 // Attachment timestamp upper bound AttachmentTsLower int64 // Attachment timestamp lower bound Value int64 // Transaction value Ts int64 CurrentIndex int64 LastIndex int64 Trailer []byte // UDP packet trailer. Only set if message was read with ParseUdpBytes. // contains filtered or unexported fields }
func ParseTxBytes ¶
ParseTxBytes parses transaction bytes without an UDP trailer.
func ParseUdpBytes ¶
ParseUdpBytes parses a transaction including UDP trailer bytes.
func (Message) AddressTrytes ¶
func (Message) BranchTrytes ¶
func (Message) BundleTrytes ¶
func (Message) NonceTrytes ¶
func (Message) ObsoleteTagTrytes ¶
func (Message) Store ¶
Store stores the message in the tangle. Returns an error if storage failed or the transaction already exists.
func (*Message) TrailerHash ¶
func (Message) TrunkTrytes ¶
func (Message) TxDigestHex ¶
type MultiString ¶
type MultiString []string
func (*MultiString) Set ¶
func (m *MultiString) Set(value string) error
func (MultiString) String ¶
func (m MultiString) String() string
Click to show internal directories.
Click to hide internal directories.