Documentation ¶
Index ¶
- type Rtcontext
- type RunTimeContext
- func (rtc *RunTimeContext) RtcAddInstruction(ctx context.Context, handle interface{}, level string, insttype string, ...) (interface{}, error)
- func (rtc *RunTimeContext) RtcAddLevel(ctx context.Context, handle interface{}, level string, value string) (interface{}, error)
- func (rtc *RunTimeContext) RtcAddMeta(ctx context.Context, meta interface{}) error
- func (rtc *RunTimeContext) RtcAddOneLevel(ctx context.Context, pl interface{}, level string, value interface{}) (interface{}, error)
- func (rtc *RunTimeContext) RtcAddResource(ctx context.Context, handle interface{}, resname string, value interface{}) (interface{}, error)
- func (rtc *RunTimeContext) RtcCreate(ctx context.Context) (interface{}, error)
- func (rtc *RunTimeContext) RtcDeletePair(ctx context.Context, handle interface{}) error
- func (rtc *RunTimeContext) RtcDeletePrefix(ctx context.Context, handle interface{}) error
- func (rtc *RunTimeContext) RtcGet(ctx context.Context) (interface{}, error)
- func (rtc *RunTimeContext) RtcGetHandles(ctx context.Context, handle interface{}) ([]interface{}, error)
- func (rtc *RunTimeContext) RtcGetMeta(ctx context.Context) (interface{}, error)
- func (rtc *RunTimeContext) RtcGetValue(ctx context.Context, handle interface{}, value interface{}) error
- func (rtc *RunTimeContext) RtcInit() (interface{}, error)
- func (rtc *RunTimeContext) RtcInitWithValue(value interface{}) (interface{}, error)
- func (rtc *RunTimeContext) RtcLoad(ctx context.Context, id interface{}) (interface{}, error)
- func (rtc *RunTimeContext) RtcUpdateValue(ctx context.Context, handle interface{}, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rtcontext ¶
type Rtcontext interface { RtcInit() (interface{}, error) RtcInitWithValue(value interface{}) (interface{}, error) RtcLoad(ctx context.Context, id interface{}) (interface{}, error) RtcCreate(ctx context.Context) (interface{}, error) RtcAddMeta(ctx context.Context, meta interface{}) error RtcGet(ctx context.Context) (interface{}, error) RtcAddLevel(ctx context.Context, handle interface{}, level string, value string) (interface{}, error) RtcAddResource(ctx context.Context, handle interface{}, resname string, value interface{}) (interface{}, error) RtcAddInstruction(ctx context.Context, handle interface{}, level string, insttype string, value interface{}) (interface{}, error) RtcDeletePair(ctx context.Context, handle interface{}) error RtcDeletePrefix(ctx context.Context, handle interface{}) error RtcGetHandles(ctx context.Context, handle interface{}) ([]interface{}, error) RtcGetValue(ctx context.Context, handle interface{}, value interface{}) error RtcUpdateValue(ctx context.Context, handle interface{}, value interface{}) error RtcGetMeta(ctx context.Context) (interface{}, error) RtcAddOneLevel(ctx context.Context, pl interface{}, level string, value interface{}) (interface{}, error) }
type RunTimeContext ¶
type RunTimeContext struct {
// contains filtered or unexported fields
}
func (*RunTimeContext) RtcAddInstruction ¶
func (rtc *RunTimeContext) RtcAddInstruction(ctx context.Context, handle interface{}, level string, insttype string, value interface{}) (interface{}, error)
Add instruction at a given level and type, return the new handle
func (*RunTimeContext) RtcAddLevel ¶
func (rtc *RunTimeContext) RtcAddLevel(ctx context.Context, handle interface{}, level string, value string) (interface{}, error)
Add a new level at a given handle and return the new handle
func (*RunTimeContext) RtcAddMeta ¶
func (rtc *RunTimeContext) RtcAddMeta(ctx context.Context, meta interface{}) error
RtcAddMeta is used for saving meta data of appContext into ETCD.
func (*RunTimeContext) RtcAddOneLevel ¶
func (rtc *RunTimeContext) RtcAddOneLevel(ctx context.Context, pl interface{}, level string, value interface{}) (interface{}, error)
RtcAddOneLevel adds one more level to the existing context prefix.RtcAddOneLevel. It takes in PreviousContentLevel as inteface, new level to be appended as string and the value to be saved of any type. It returns the updated interface and nil if no error.
func (*RunTimeContext) RtcAddResource ¶
func (rtc *RunTimeContext) RtcAddResource(ctx context.Context, handle interface{}, resname string, value interface{}) (interface{}, error)
Add a resource under the given level and return new handle
func (*RunTimeContext) RtcCreate ¶
func (rtc *RunTimeContext) RtcCreate(ctx context.Context) (interface{}, error)
func (*RunTimeContext) RtcDeletePair ¶
func (rtc *RunTimeContext) RtcDeletePair(ctx context.Context, handle interface{}) error
Delete the key value pair using given handle
func (*RunTimeContext) RtcDeletePrefix ¶
func (rtc *RunTimeContext) RtcDeletePrefix(ctx context.Context, handle interface{}) error
Delete all handles underneath the given handle
func (*RunTimeContext) RtcGet ¶
func (rtc *RunTimeContext) RtcGet(ctx context.Context) (interface{}, error)
Get the root handle
func (*RunTimeContext) RtcGetHandles ¶
func (rtc *RunTimeContext) RtcGetHandles(ctx context.Context, handle interface{}) ([]interface{}, error)
Return the list of handles under the given handle
func (*RunTimeContext) RtcGetMeta ¶
func (rtc *RunTimeContext) RtcGetMeta(ctx context.Context) (interface{}, error)
RtcGetMeta method fetches the meta data of the rtc object and returns it.
func (*RunTimeContext) RtcGetValue ¶
func (rtc *RunTimeContext) RtcGetValue(ctx context.Context, handle interface{}, value interface{}) error
Get the value for a given handle
func (*RunTimeContext) RtcInit ¶
func (rtc *RunTimeContext) RtcInit() (interface{}, error)
Intialize context by assiging a new id
func (*RunTimeContext) RtcInitWithValue ¶
func (rtc *RunTimeContext) RtcInitWithValue(value interface{}) (interface{}, error)
Intialize context by assiging a new id
func (*RunTimeContext) RtcLoad ¶
func (rtc *RunTimeContext) RtcLoad(ctx context.Context, id interface{}) (interface{}, error)
Load context using the given id
func (*RunTimeContext) RtcUpdateValue ¶
func (rtc *RunTimeContext) RtcUpdateValue(ctx context.Context, handle interface{}, value interface{}) error
Update the value of a given handle