func()

in pkg/yml/rule.go [22:36]


func (r *Rule) ToMem() []mem.MemModel {
	result := make([]mem.MemModel, 0)
	fullName := *r.Kind + separator + *r.Name
	for _, http := range r.HTTP {
		route := &mem.Route{
			Kind:     r.Kind,
			FullName: &fullName,
			Name:     r.Name,
			Hosts:    r.Hosts,
			Match:    http.Match,
		}
		result = append(result, route)
	}
	return result
}