MCPcopy
hub / github.com/nats-io/nats.go / PutBytes

Method PutBytes

object.go:844–846  ·  view source on GitHub ↗

PutBytes is convenience function to put a byte slice into this object store.

(name string, data []byte, opts ...ObjectOpt)

Source from the content-addressed store, hash-verified

842
843// PutBytes is convenience function to put a byte slice into this object store.
844func (obs *obs) PutBytes(name string, data []byte, opts ...ObjectOpt) (*ObjectInfo, error) {
845 return obs.Put(&ObjectMeta{Name: name}, bytes.NewReader(data), opts...)
846}
847
848// GetBytes is a convenience function to pull an object from this object store and return it as a byte slice.
849func (obs *obs) GetBytes(name string, opts ...GetObjectOpt) ([]byte, error) {

Callers

nothing calls this directly

Calls 1

PutMethod · 0.95

Tested by

no test coverage detected